sunyke 发表于 2015-4-24 07:46:12

python的加密模块(md5,sha,crypt)学习

  md5(Message-Digest Algorithm 5) 模块用于计算信息密文(信息摘要),得出一个128位的密文。sha模块跟md5相似,但生成的是160位的签名。使用方法是相同的。
  如下实例是使用md5的:



# /usr/bin/python
# -*- coding:utf-8 -*-
import base64
try:
import hashlib
hash = hashlib.md5()
except ImportError:
# for Python
页: [1]
查看完整版本: python的加密模块(md5,sha,crypt)学习