From 0a2b6494cc9ac7ccdff1b97aa18f05da41a19620 Mon Sep 17 00:00:00 2001 From: ibuler Date: Thu, 25 Jan 2018 16:38:40 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E4=BF=AE=E6=94=B9=E7=AD=BE=E5=90=8D?= =?UTF-8?q?md5=E7=AE=97=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/common/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/common/utils.py b/apps/common/utils.py index f366e6786..0915564ae 100644 --- a/apps/common/utils.py +++ b/apps/common/utils.py @@ -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"