PyCryptodome是PyCrypto的一個分支。基於PyCrypto2.6.1,多瞭如下特性:html
官方文檔:Compatibility with PyCryptodom
------------------spa
0x01 安裝code
pip install PyCryptodome
0x02 使用orm
跟PyCrypto2.6用法相似,如下以AES爲例:htm
from Crypto.Cipher import AES key='1234567890abcdef' obj=AES.new(key,AES.MODE_ECB) cipher=obj.encrypt('message: pcat.cc')