Revert "Use base64 sha1hash instead of base16"

This reverts commit bed8214a11.
It turns out the sha1hash should be a base16 string.
This commit is contained in:
moyamo 2016-01-02 22:19:59 +02:00
parent d4a0593874
commit 1446e82dc0

View file

@ -24,7 +24,6 @@ __email__ = "post@steffenvogel.de"
import e4u import e4u
import base64 import base64
import hashlib import hashlib
import base64
def ago(secs): def ago(secs):
periods = ["second", "minute", "hour", "day", "week", "month", "year", "decade"] periods = ["second", "minute", "hour", "day", "week", "month", "year", "decade"]
@ -51,4 +50,4 @@ def decodePassword(password):
return base64.b64decode(bytes(password.encode("utf-8"))) return base64.b64decode(bytes(password.encode("utf-8")))
def sha1hash(data): def sha1hash(data):
return base64.b64encode(hashlib.sha1(data).digest()) return hashlib.sha1(data).hexdigest()