python reptile - to correct misperceptions MD5

m = md5("12345678".encode())
print(m.hexdigest())
# 25d55ad283aa400af464c76d713c07ad

m = md5("1234".encode())
print(m.hexdigest())
# 81dc9bdb52d04dc20036dbd8313ed055
m.update("5678".encode())
print(m.hexdigest())
# 25d55ad283aa400af464c76d713c07ad

hashlib.md5.update not a replacement, it is appended.

Guess you like

Origin www.cnblogs.com/loveprogramme/p/12148415.html