import hashlib md5 = hashlib.md5() md5.update('明文1'.encode('utf-8')) md5.update('明文2'.encode('utf-8')) sign = md5.hexdigest() print(sign)