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

Function _compute_hashes

IntelOSINT.py:19803–19813  ·  view source on GitHub ↗
(video_path: Path, chunk_size: int = 1024 * 1024)

Source from the content-addressed store, hash-verified

19801 return None
19802
19803 def _compute_hashes(video_path: Path, chunk_size: int = 1024 * 1024):
19804 md5_h = hashlib.md5()
19805 sha256_h = hashlib.sha256()
19806 with open(video_path, "rb") as fh:
19807 while True:
19808 chunk = fh.read(chunk_size)
19809 if not chunk:
19810 break
19811 md5_h.update(chunk)
19812 sha256_h.update(chunk)
19813 return {"md5": md5_h.hexdigest(), "sha256": sha256_h.hexdigest()}
19814
19815 def _format_report_value(v):
19816 if v is None:

Callers 3

_build_media_reportFunction · 0.85
probe_metadataFunction · 0.85
probe_image_metadataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected