Skip to content

Commit

Permalink
fix: replaced md4 with blake2b
Browse files Browse the repository at this point in the history
(cherry picked from commit 167247de134ab2b03e03bfd6c579c86d7ce59e4a)
  • Loading branch information
Anas12091101 authored and blarghmatey committed Apr 16, 2024
1 parent 9d29595 commit d19572a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions common/djangoapps/util/memcache.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ def fasthash(string):
"""
Hashes `string` into a string representation of a 128-bit digest.
"""
md4 = hashlib.new("md4")
md4.update(string.encode('utf-8'))
return md4.hexdigest()
blake2b = hashlib.new("blake2b", digest_size=16)
blake2b.update(string.encode('utf-8'))
return blake2b.hexdigest()


def cleaned_string(val):
Expand Down

0 comments on commit d19572a

Please sign in to comment.