Encrypting AES Error Need Help

Im new in OB2 and trying to encrypt AES but got this
[Executing block AES Encrypt String] CryptographicException: Specified key is not a valid size for this algorithm.


var encryptedPass = CryptoJS.AES.encrypt(Text, Key, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.NoPadding });

Every Algorithm holds the different size of key and iv. For example the key will be 16 characters means the iv should 8 like that.

So check your key Size, It will be high or low !

i try but not work. i ask chatGPT and it give me this javascript but i cant found this function on OB2
var passwordKeyWordArray = CryptoJS.enc.Hex.parse(passwordKey);

Why don’t you import the function in ob2?