Unverified Commit ed2e4646 authored by Areeb Syed's avatar Areeb Syed Committed by GitHub
Browse files

Addendum Fix to support FIPS enabled machines with MD5 hashing (#17043)


Signed-off-by: default avatarsydarb <areebsyed237@gmail.com>
parent 2c8ed8ee
......@@ -357,7 +357,8 @@ class SharedStorageConnector(KVConnectorBase_V1):
ids.
"""
input_ids_bytes = input_ids.numpy().tobytes()
input_ids_hash = hashlib.md5(input_ids_bytes).hexdigest()
input_ids_hash = hashlib.md5(input_ids_bytes,
usedforsecurity=False).hexdigest()
foldername = os.path.join(self._storage_path, input_ids_hash)
if create_folder:
os.makedirs(foldername, exist_ok=True)
......
......@@ -794,6 +794,7 @@ def compute_hash() -> str:
if key in environment_variables:
factorize(key)
hash_str = hashlib.md5(str(factors).encode()).hexdigest()
hash_str = hashlib.md5(str(factors).encode(),
usedforsecurity=False).hexdigest()
return hash_str
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment