0
下面的代碼給中差解密錯誤Node.js的加密拋出錯誤
vaultEngine.AESDecrypt = function (encKey, data) {
var cipherObject = crypto.createDecipheriv('aes-256-cbc', encKey, "a2xhcgAAAAAAAAAA");
var Fcontent = cipherObject.update(data, vaultEngine.outputEncoding, vaultEngine.inputEncoding);
Fcontent += cipherObject.final(vaultEngine.inputEncoding);
//console.log("Decryption data is:"+Fcontent);
return Fcontent;
}
具體這個錯誤:
TypeError: error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decr
ypt