标签:hmac ret random sdff get dom har AC port
import time
from hashlib import sha1
import hmac
def get_signal(time_stamp):
b=b"sdffsdfs"
a = hmac.new(b, digestmod=sha1) # HMAC key
a.update(time_stamp) # timeStamp
return a.hexdigest()
x=time.time()
x=b‘x‘
print(get_signal(x))
# time.sleep(3)
import chardet,random,time,hashlib
sign=‘mima‘
hl = hashlib.md5()
i=int(time.time()*1000)+random.randint(1,10)
hl.update(sign.encode(encoding=‘utf-8‘))
sign=hl.hexdigest()+str(i)
print(sign)
标签:hmac ret random sdff get dom har AC port
原文地址:https://www.cnblogs.com/nanyu/p/9032498.html