DES

import pyDes

python -c "import pyDes; des = pyDes.des('This Key'); print des.encrypt('SomeData').encode('hex')"

but KEY must 8 、16、24 

import binascii

 binascii.hexlify(data)  

REFER:

[1] pyDes库 实现python的des加密

http://www.cnblogs.com/SunboyL/p/pyDes.html

[2] Cryptography and Python

http://lenciel.cn/2013/07/cryptography-and-python/

[3] 加密解密工具类 EncryptUtil

http://uule.iteye.com/blog/1925046

[4] implementing DES-X (mode CBC) using PyCrypto

https://gist.github.com/doublereedkurt/3921909

[5] python 对字符串的加密解密

http://www.simonzhang.net/?p=1903

[6] 数据加密算法

http://baike.baidu.com/view/878529.htm

[7] 非对称加密算法

http://baike.baidu.com/view/1490349.htm

[8] Pycrypto与RSA密码技术笔记

http://python.jobbole.com/84094/

原文地址:https://www.cnblogs.com/crac/p/7233831.html