python 计算md5 import hashlib src = "afnjanflkas" m2 = hashlib.md5() m2.update(src) print m2.hexdigest() --------> 输出的值 md5值