>>> import hashlib
>>> m=hashlib.md5()
>>> print(m)    #
>>> m.update('admin'.encode('utf-8'))
>>> print(m.hexdigest())     #21232f297a57a5a743894a0e4a801fc3
>>> m.update('aaaa'.encode('utf-8'))   #在前者基础上再进行加密这时加密的不是 aaaa 是  adminaaaa
>>> print(m.hexdigest())       #19799a0f30118efd90732c2a4b56be7c

>>> s=hashlib.sha256()
>>> print(s)         #
>>> s.update('admin'.encode('utf-8'))
>>> print(s.hexdigest())  #8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918
>>> s.update('aaaa'.encode('utf-8')) #在前者基础上再进行加密这时加密的不是 aaaa 是  adminaaaa
>>> print(s.hexdigest())  #8d36408d8f07e97c803f6b18a507b4688362b9680cfc29a080179f4d1a6525aa