From 7cc60c695850ae88b303f2ba4ba8fdd05335f8f6 Mon Sep 17 00:00:00 2001 From: Felix Leblanc Date: Mon, 12 Oct 2015 15:07:06 -0400 Subject: [PATCH] Return digest instead of hexdigest --- app.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app.py b/app.py index eb61a3d..6a8ce51 100755 --- a/app.py +++ b/app.py @@ -56,9 +56,7 @@ def get_hash(password, salt): m = hashlib.sha512() m.update(salt.encode('utf8')) m.update(password.encode('utf8')) - hex = m.hexdigest() - binary_hex_digest = binascii.unhexlify(hex) - return binary_hex_digest + return m.digest() def email_exists(email):