0%
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| from hashlib import md5
def encrypt_md5(s): obj_md5 = md5()
obj_md5.update(s.encode(encoding='utf-8')) return obj_md5.hexdigest()
if __name__ == '__main__': print(encrypt_md5('admin')) print(md5('admin'.encode(encoding='utf-8')).hexdigest())
|