#-*- coding:utf-8 -*-
import hashlib
m= hashlib.md5() #创建md5对象
m.update('abcdefg') #生成加密串,其中password是要加密的字符串
print m.hexdigest() #打印经过md5加密的字符串
输出结果:7ac66c0f148de9519b8bd264312c4d64
#-*- coding:utf-8 -*-
import hashlib
m= hashlib.md5() #创建md5对象
m.update('abcdefg') #生成加密串,其中password是要加密的字符串
print m.hexdigest() #打印经过md5加密的字符串
输出结果:7ac66c0f148de9519b8bd264312c4d64