an00/an00.github.io

python 与 openssl 对应的 AES-CBC

Opened this issue · 0 comments

an00 commented

https://blog.an00.cn/2021/04/05/python-%E4%B8%8E-openssl-%E5%AF%B9%E5%BA%94%E7%9A%84-AES-CBC/

python 实现与 openssl 对应的 AES-CBC 可对应 openssl 的 AES-CBC 加密,参考来源 奇怪的需求又增加了,项目大量使用的 shell 脚本,有需求加密某内容,让脚本解密后使用。一番尝试后,发现 python 中的 AES 还与操作系统中 openssl 工具加解密不对应。又一番面向 Stack Overflow 编程后,调试出了合适的 demo,以下是处理内容