Did you write like this? Use key to perform AES decryption on text, every time text and key are the same, but the result is different, confused
// 问题: 使用key 对text进行AES解密,每次text和key是相同的,但是结果不同
const res = AES.decrypt(text, key)
Solution: parse the key with CryptoJS.enc.Utf8.parse
// 把key 用CryptoJS.enc.Utf8.parse 解析一下即可
const res = AES.decrypt(text, CryptoJS.enc.Utf8.parse(key))
reference address