md5

import hashlib
import string

hash1 = hashlib.md5()
hash1.update(bytes("123",encoding = "utf-8"))
h = hash1.hexdigest()
n = int(h,base=16)

print(n)
print(h)
print(hex(n))


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\python.exe “C:\Program Files\JetBrains\PyCharm 2017.2\helpers\pydev\pydevd.py” –multiproc –qt-support=auto –client 127.0.0.1 –port 6131 –file C:/Users/Administrator/PycharmProjects/py/md5test6.py
pydev debugger: process 5276 is connecting

Connected to pydev debugger (build 172.3757.67)
42767516990368493138776584305024125808
202cb962ac59075b964b07152d234b70
0x202cb962ac59075b964b07152d234b70

Process finished with exit code 0

发表回复