美文网首页
模块 base64 生成token

模块 base64 生成token

作者: 土豆与番茄 | 来源:发表于2019-08-27 15:08 被阅读0次

import base64

key = "zxc"
secret = "das"

string = "app:%s:%s" % (key, secret)
bstring = base64.b64encode(string.encode("utf8")).decode('utf8')
auth = "Bearer %s" % bstring
print(auth)

相关文章

网友评论

      本文标题:模块 base64 生成token

      本文链接:https://www.haomeiwen.com/subject/bgeeectx.html