Commit 83b8d863 authored by 张允禹's avatar 张允禹

fix sign

parent 76082e7c
...@@ -25,6 +25,8 @@ import base64 ...@@ -25,6 +25,8 @@ import base64
def get_sign_string(source, secret): def get_sign_string(source, secret):
secret = secret.encode()
source = source.encode()
h = hmac.new(secret, source, hashlib.sha1) h = hmac.new(secret, source, hashlib.sha1)
signature = base64.encodestring(h.digest()).strip() signature = base64.encodestring(h.digest()).strip()
return signature return signature
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment