Skip to content
Merged
Changes from 3 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
6 changes: 5 additions & 1 deletion pyartifactory/models/artifact.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ class Checksums(BaseModel):
@classmethod
def generate(cls, file_: Path) -> Checksums:
block_size: int = 65536
mapping: dict[str, Callable[[], Any]] = {"md5": hashlib.md5, "sha1": hashlib.sha1, "sha256": hashlib.sha256}
mapping: dict[str, Callable[[], Any]] = {
"md5": lambda: hashlib.md5(usedforsecurity=False),
Comment thread
tommycbird marked this conversation as resolved.
Outdated
"sha1": lambda: hashlib.sha1(usedforsecurity=False),
"sha256": lambda: hashlib.sha256(usedforsecurity=False),
}
results = {}

for algorithm, hashing_function in mapping.items():
Expand Down
Loading