用于 AES 256 加密的(纯)Python 库是什么? [英] What (pure) Python library to use for AES 256 encryption?

查看:23
本文介绍了用于 AES 256 加密的(纯)Python 库是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个(最好是纯的)python 库来进行 AES 256 加密和解密.

I am looking for a (preferably pure) python library to do AES 256 encryption and decryption.

这个库应该支持 CBC 密码模式并使用 PKCS7 填充 根据回答我之前的一个问题.

This library should support the CBC cipher mode and use PKCS7 padding according to the answer to an earlier question of mine.

该库至少应该可以在 Mac OS X (10.4) 和 Windows XP 上运行.理想情况下,只需将其放入我的项目的源目录中即可.我看过 Josh Davis 的这个,但我不确定它有多好以及是否是否需要 CBC 密码模式...扫描来源表明它没有

The library should at least work on Mac OS X (10.4) and Windows XP. Ideally just by dropping it into the source directory of my project. I have seen this by Josh Davis, but am not sure about how good it is and if it does the required CBC cipher mode... Scanning the source suggests it doesn't

推荐答案

PyCrypto 应该适合你.

PyCrypto should be the one for you.

编辑 02/10/2020:不幸的是,我无法删除这篇文章,因为这是公认的答案.正如人们在评论中指出的那样,这个库不再被维护,从安全的角度来看,它可能也很脆弱.因此,请转而查看以下答案.

Edit 02/10/2020: unfortunately I cannot delete this post, since it's the accepted answer. As people pointed out in the comments, this library is not mantained anymore and probably also vulnerable from a security point of view. So please, take a look to the below answers instead.

这篇关于用于 AES 256 加密的(纯)Python 库是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆