I am trying to use external library file aes.js , ...
# suitescript
s
I am trying to use external library 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 Is it not the right way to do it ?
Copy code
/**
 * @NApiVersion 2.x
 * @NScriptType ClientScript
 * @NModuleScope Public
 */define(['./aes'],
function(aes) {     
    function pageInit(scriptContext) {
		 var encryptedAES = aes.CryptoJS.AES.encrypt("Message", "testpassword");
		 
 }