From 1446e82dc0c28380ebd610885652155705b51eaa Mon Sep 17 00:00:00 2001 From: moyamo Date: Sat, 2 Jan 2016 22:19:59 +0200 Subject: [PATCH] Revert "Use base64 sha1hash instead of base16" This reverts commit bed8214a1124f462beeb5c4001259f047d5929eb. It turns out the sha1hash should be a base16 string. --- utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/utils.py b/utils.py index b9fdf11..f6d120c 100644 --- a/utils.py +++ b/utils.py @@ -24,7 +24,6 @@ __email__ = "post@steffenvogel.de" import e4u import base64 import hashlib -import base64 def ago(secs): periods = ["second", "minute", "hour", "day", "week", "month", "year", "decade"] @@ -51,4 +50,4 @@ def decodePassword(password): return base64.b64decode(bytes(password.encode("utf-8"))) def sha1hash(data): - return base64.b64encode(hashlib.sha1(data).digest()) + return hashlib.sha1(data).hexdigest()