Skip to content

Commit ab37ba5

Browse files
committed
Updated mapping to pass in usedforsecurity=False
1 parent ac23195 commit ab37ba5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pyartifactory/models/artifact.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ class Checksums(BaseModel):
2121
@classmethod
2222
def generate(cls, file_: Path) -> Checksums:
2323
block_size: int = 65536
24-
mapping: dict[str, Callable[[], Any]] = {"md5": hashlib.md5, "sha1": hashlib.sha1, "sha256": hashlib.sha256}
24+
mapping: dict[str, Callable[[], Any]] = {
25+
"md5": lambda: hashlib.md5(usedforsecurity=False),
26+
"sha1": lambda: hashlib.sha1(usedforsecurity=False),
27+
"sha256": lambda: hashlib.sha256(usedforsecurity=False),
28+
}
2529
results = {}
2630

2731
for algorithm, hashing_function in mapping.items():

0 commit comments

Comments
 (0)