Skip to content

Commit ed2e464

Browse files
authored
Addendum Fix to support FIPS enabled machines with MD5 hashing (#17043)
Signed-off-by: sydarb <areebsyed237@gmail.com>
1 parent 2c8ed8e commit ed2e464

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

vllm/distributed/kv_transfer/kv_connector/v1/shared_storage_connector.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,8 @@ def _generate_foldername_debug(
357357
ids.
358358
"""
359359
input_ids_bytes = input_ids.numpy().tobytes()
360-
input_ids_hash = hashlib.md5(input_ids_bytes).hexdigest()
360+
input_ids_hash = hashlib.md5(input_ids_bytes,
361+
usedforsecurity=False).hexdigest()
361362
foldername = os.path.join(self._storage_path, input_ids_hash)
362363
if create_folder:
363364
os.makedirs(foldername, exist_ok=True)

vllm/envs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,7 @@ def factorize(name: str):
794794
if key in environment_variables:
795795
factorize(key)
796796

797-
hash_str = hashlib.md5(str(factors).encode()).hexdigest()
797+
hash_str = hashlib.md5(str(factors).encode(),
798+
usedforsecurity=False).hexdigest()
798799

799800
return hash_str

0 commit comments

Comments
 (0)