// content = CryptJS.enc.Base64.stringify(content); let aesKey = CryptJS.enc.Utf8.parse(_key); let iv = CryptJS.enc.Utf8.parse(_iv); // 解密 let decrypted = CryptJS.AES.decrypt(_content, aesKey, { iv: iv, mode: CryptJS.mode.CBC, padding: CryptJS.pad.Pkcs7 }) // console...
// content = CryptJS.enc.Base64.stringify(content); let aesKey = CryptJS.enc.Utf8.parse(_key); let iv = CryptJS.enc.Utf8.parse(_iv); // 解密 let decrypted = CryptJS.AES.decrypt(_content, aesKey, { iv: iv, mode: CryptJS.mode.CBC, padding: CryptJS.pad.Pkcs7 }) // console...
* @returns 32 字节的AES密钥*/getAesKey: function () { let uuid=UUID.v1();//console.log(uuid)let aeskey =CryptJS.enc.Utf8.parse(uuid) aeskey= CryptJS.enc.Base64.stringify(aeskey).substring(2,34)//console.log(aeskey + "\n" + "长度:" + aeskey.length);returnaeskey; },/**...