举例说明:
import hashlib # 导入hashlibh_md5 = hashlib.md5() # 创建hash对象h_md5.update(string.encode('utf-8')) # 导入字符串hash_code = h_md5.hexdigest # 取出hash值