Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docling_core/types/doc/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,7 @@ def _image_to_hexhash(self) -> Optional[str]:
image_bytes = self.image._pil.tobytes()

# Create a hash object (e.g., SHA-256)
hasher = hashlib.sha256()
hasher = hashlib.sha256(usedforsecurity=False)

# Feed the image bytes into the hash object
hasher.update(image_bytes)
Expand Down
2 changes: 1 addition & 1 deletion docling_core/utils/legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@


def _create_hash(string: str):
hasher = hashlib.sha256()
hasher = hashlib.sha256(usedforsecurity=False)
hasher.update(string.encode("utf-8"))

return hasher.hexdigest()
Expand Down