MCPcopy Create free account
hub / github.com/CScorza/IntelOSINT / _compute_face_hashes

Function _compute_face_hashes

IntelOSINT.py:19399–19409  ·  view source on GitHub ↗
(file_path: Path)

Source from the content-addressed store, hash-verified

19397 return False
19398
19399 def _compute_face_hashes(file_path: Path):
19400 md5_h = hashlib.md5()
19401 sha256_h = hashlib.sha256()
19402 with open(file_path, "rb") as fh:
19403 while True:
19404 chunk = fh.read(1024 * 1024)
19405 if not chunk:
19406 break
19407 md5_h.update(chunk)
19408 sha256_h.update(chunk)
19409 return {"md5": md5_h.hexdigest(), "sha256": sha256_h.hexdigest()}
19410
19411 def _latin1(v):
19412 return str(v).encode("latin-1", "ignore").decode("latin-1")

Callers 1

_build_face_reportFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected