用hashlib生成动态token
生成token:
import timeimport hashlib
token ='jdhfvasuiodfbhsjdbvaio' client_time = time.time() client_token = '%s|%s' % (token, client_time) m = hashlib.md5() m.update(bytes(client_token, encoding='utf-8')) md5_token = m.hexdigest() hash_token = '%s|%s' % (md5_token, client_time) #加一个时间戳签名