import hashlib

h5=hashlib.md5() ctime=time.time() h5.update(bytes(str(ctime),encoding='utf-8')) token=h5.hexdigest()#digest()返回的是b格式