def GET(self):
#??????
data = web.input()
signature=data.signature
timestamp=data.timestamp
nonce=data.nonce
echostr=data.echostr
#???token
token="YourToken" #????????????????token
#?????
list=[token,timestamp,nonce]
list.sort()
sha1=hashlib.sha1()
map(sha1.update,list)
hashcode=sha1.hexdigest()
#sha1????
#??????????????echostr
if hashcode == signature:
return echostr
评论列表
文章目录