首页 > 解决方案 > openssl 解密问题因 EVP_DecryptFinal_ex 失败:解密错误

问题描述

我正在使用OpenSSL 1.1.1f 31 Mar 2020,但在解密用 openssl 加密的数据时遇到问题。

加密命令是

openssl enc -aes-256-cbc -md sha512 -pbkdf2 -iter 100000 -salt -in in.txt -out out.dat

解密命令是

openssl aes-256-cbc -d -md sha256 -salt -iter 100000 -pbkdf2 -in out.dat -out out.txt

错误是

输入 aes-256-cbc 解密密码:bad decrypt 139749253547328:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:../crypto/evp/evp_enc.c:583:

谢谢

标签: openssl

解决方案


推荐阅读