我有以下密钥和 IV 可以将07KxrSbGIoPCIYh0I16maw==解密为“496271”,我尝试搜索类似的问题,但我对加密知识的缺乏使我无法自己解决这个问题。
get decryptedCode() {
var key = CryptoJS.enc.Utf8.parse(
"814591256d331af80bec0fa2bef1123e37e9f181f363af374787e24160275bce"
)
var iv = CryptoJS.enc.Utf8.parse("825b1f7c5f5edd614e8a0a0fef3c9ecf")
var ciphertext = CryptoJS.enc.Base64.parse("07KxrSbGIoPCIYh0I16maw==")
var encryptedCP = CryptoJS.lib.CipherParams.create({
ciphertext: ciphertext,
formatter: CryptoJS.format.OpenSSL
})
var decryptedWA = CryptoJS.AES.decrypt(encryptedCP, key, { iv: iv })
var decryptedUtf8 = decryptedWA.toString(CryptoJS.enc.Utf8)
console.log(decryptedUtf8) // this should be 496271 but I keep getting blank string
return decryptedUtf8
}
喵喔喔
相关分类