import hashlib def gen_md5(origin): """md5加密""" ha = hashlib.md5(b'lkplkp123123') ha.update(origin.encode('utf-8')) return ha.hexdigest()