function AESEncrypt(source, phrase) { var encryptedAES = CryptoJS.AES.encrypt(source, phrase); return encryptedAES.toString(); } function AESDecrypt(source, phrase) { var decryptedBytes = CryptoJS.AES.decrypt(source, phrase); return decryptedBytes.toString(CryptoJS.enc.Latin1); } // vim: sw=4 ts=4