To make it simple, if you want to encrypt and decrypt to get same value without having funny characters and outputs around, use CryptoJS.AES.encrypt(msg, key, { mode: CryptoJS.mode.ECB });
, passing in a third argument, although it is a weak approach, it's prolly the least you can hope for.