blob: e3c1f7b74ce355404502e7eb32e1cddc0f3cdde7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
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
|