This commit is contained in:
2025-08-20 04:15:43 +02:00
parent 6b9f0cf291
commit e4bb201181
95 changed files with 194 additions and 907 deletions

13
herolib/tools/md5.py Normal file
View File

@@ -0,0 +1,13 @@
import hashlib
from typing import List
def file_md5(file_path: str) -> str:
"""
Compute the MD5 hash of the file content.
"""
hash_md5 = hashlib.md5()
with open(file_path, "rb") as f:
for chunk in iter(lambda: f.read(4096), b""):
hash_md5.update(chunk)
return hash_md5.hexdigest()