hash
import hashlib content = 'its so coll'.encode('utf8') o = hashlib.sha1() # 创建一个hash对象 o.update(content) hash_sixteen = o.hexdigest() # 16进制
content1 = 'its so coll'.encode('utf8')
o1 = hashlib.sha1() # 创建一个hash对象
o1.update(content1)
hash_sixteen1 = o1.hexdigest() # 16进制
hash_sixteen is hash_sixteen1 False
hash_sixteen == hash_sixteen1 True hash算法相同