[Update] 修改签名md5算法

pull/968/head
ibuler 2018-01-25 16:38:40 +08:00
parent 0c935e8922
commit 0a2b6494cc
1 changed files with 2 additions and 1 deletions

View File

@ -238,9 +238,10 @@ def content_md5(data):
"""
if isinstance(data, str):
data = hashlib.md5(data.encode('utf-8'))
value = base64.b64encode(data.digest())
value = base64.b64encode(data.hexdigest().encode('utf-8'))
return value.decode('utf-8')
_STRPTIME_LOCK = threading.Lock()
_GMT_FORMAT = "%a, %d %b %Y %H:%M:%S GMT"