Skip to content
Snippets Groups Projects
Commit 217e79dd authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[hash][hashJSON] Encode before hashing

parent 8ff9c942
No related branches found
No related tags found
2 merge requests!17Merge development branch 1.5.x,!10Py3 compatibility
......@@ -113,7 +113,7 @@ def hashJSON(contents, description):
contents = copy.deepcopy(contents) #temporary copy
del contents[description]
contents = simplejson.dumps(contents, sort_keys=True)
return hashlib.sha256(contents).hexdigest()
return hashlib.sha256(contents.encode('utf-8')).hexdigest()
#----------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment