Guys having trouble using external library of Crypto JS file aes.js , so i placed that file in filecabinet in same folder where the below script resides.
But getting this error : TypeError Cannot read property 'CryptoJS' of undefined
@mattdahse says it has to be AMD compatible and needs to export function . Can some one please share me a working example of using external crypto js
/**
* @NApiVersion 2.x
* @NScriptType ClientScript
* @NModuleScope Public
*/define(['./aes'],
function(aes) {
function pageInit(scriptContext) {
var encryptedAES = aes.CryptoJS.AES.encrypt("Message", "testpassword");
}