Fix encode before calling md4 hash in common/djangoapps/util/memcache.py

This commit is contained in:
Nimisha Asthagiri
2019-08-19 11:51:05 -04:00
parent 1951d2eab8
commit b97db5aa86

View File

@@ -17,7 +17,7 @@ def fasthash(string):
Hashes `string` into a string representation of a 128-bit digest.
"""
md4 = hashlib.new("md4")
md4.update(string)
md4.update(string.encode('utf-8'))
return md4.hexdigest()