python内置模块【hashlib】 md5加密 import hashlib def md5(origin,salt='wxy57516'): hash_object=hashlib.md5(salt.encode('utf-8')) hash_object.update(origin.encode('utf-8')) result=hash_object.hexdigest() return result print(md5('王'))