Skip to content
Snippets Groups Projects
Commit f4432615 authored by Ben Adida's avatar Ben Adida
Browse files

hash utility should return an ascii string by default, was previously hidden...

hash utility should return an ascii string by default, was previously hidden by too-smart django rendering which is no longer the case.
parent b6d54e47
No related branches found
No related tags found
No related merge requests found
...@@ -27,5 +27,5 @@ def hash_b64(s): ...@@ -27,5 +27,5 @@ def hash_b64(s):
removes the trailing "=" removes the trailing "="
""" """
hasher = SHA256.new(s.encode('utf-8')) hasher = SHA256.new(s.encode('utf-8'))
result = base64.b64encode(hasher.digest())[:-1] result = base64.b64encode(hasher.digest())[:-1].decode('ascii')
return result return result
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment