Skip to content

Commit 8406fb9

Browse files
authored
fix: usage of hashlib for FIPS (#171)
Signed-off-by: Michele Dolfi <[email protected]>
1 parent a2dcb0a commit 8406fb9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docling_serve/docling_conversion.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ def _hash_pdf_format_option(pdf_format_option: PdfFormatOption) -> bytes:
5858

5959
# Serialize the dictionary to JSON with sorted keys to have consistent hashes
6060
serialized_data = json.dumps(data, sort_keys=True)
61-
options_hash = hashlib.sha1(serialized_data.encode()).digest()
61+
options_hash = hashlib.sha1(
62+
serialized_data.encode(), usedforsecurity=False
63+
).digest()
6264
return options_hash
6365

6466

0 commit comments

Comments
 (0)