运用md5随机生成token

# 生成token 并且进行更新
def md5(username): import hashlib import time ctime = str(time.time()) m = hashlib.md5(bytes(username,encoding="utf-8") ) m.update(bytes(ctime,encoding="utf-8")) return m.hexdigest()   

  

原文地址:https://www.cnblogs.com/wakee/p/12564012.html