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)
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
网友评论