初试python des,使用了pyDes:
from pyDes import *
from binascii import unhexlify, hexlify
k = des("12345678")
d = 'the source'
d = k.encrypt(d, padmode=PAD_PKCS5)
print 'encript:', hexlify(d)
d = k.decrypt(d, padmode=PAD_PKCS5)
print 'decrypt:', d
初试python des,使用了pyDes:
from pyDes import *
from binascii import unhexlify, hexlify
k = des("12345678")
d = 'the source'
d = k.encrypt(d, padmode=PAD_PKCS5)
print 'encript:', hexlify(d)
d = k.decrypt(d, padmode=PAD_PKCS5)
print 'decrypt:', d