From cde54cc37d20dfeb09d10f84bb5d9845cc8e825b Mon Sep 17 00:00:00 2001 From: Samriti Sadhu Date: Thu, 30 May 2024 11:59:09 +0100 Subject: [PATCH] Changing the hashing technique to md5 --- application/core/filters.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/application/core/filters.py b/application/core/filters.py index fa9e54db..5b838fa8 100644 --- a/application/core/filters.py +++ b/application/core/filters.py @@ -193,12 +193,12 @@ def hash_file(filename): print("File not found when creating a hash: " + filename) return "" - sha1Hash = hashlib.new("sha1") - sha1Hash.update(content) - sha1Hashed = sha1Hash.hexdigest() + md5Hash = hashlib.new("md5", usedforsecurity=False) + md5Hash.update(content) + md5Hashed = md5Hash.hexdigest() # return the hex representation of digest - return sha1Hashed + return md5Hashed # Takes the URI and appends a param containing the current git hash