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

fix: python3 bytes to string for randomness

parent 64f60337
Branches
No related tags found
No related merge requests found
......@@ -491,9 +491,7 @@ def get_randomness(request, election):
get some randomness to sprinkle into the sjcl entropy pool
"""
return {
# back to urandom, it's fine
"randomness" : base64.b64encode(os.urandom(32))
#"randomness" : base64.b64encode(uuid.uuid4().bytes + uuid.uuid4().bytes)
"randomness" : base64.b64encode(os.urandom(32)).decode('utf-8')
}
@election_view(frozen=True)
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment