import hashlib # # #####md5#####双重加密,核对密码时也需要如此 hash = hashlib.md5(bytes(‘tttt‘, encoding=‘utf-8‘)) #tttt是第一层加密,在比较md5时也需要这么做 hash.update(bytes(‘test‘, encoding=‘utf-8‘)) result = hash.hexdigest() print(result)
时间: 2024-10-10 08:07:48
import hashlib # # #####md5#####双重加密,核对密码时也需要如此 hash = hashlib.md5(bytes(‘tttt‘, encoding=‘utf-8‘)) #tttt是第一层加密,在比较md5时也需要这么做 hash.update(bytes(‘test‘, encoding=‘utf-8‘)) result = hash.hexdigest() print(result)