MCPcopy Index your code
hub / github.com/openai/plugins / scan_local_file_digest

Function scan_local_file_digest

plugins/codex-security/scripts/workbench_db.py:1695–1700  ·  view source on GitHub ↗
(scan_dir: Path, relative_path: str)

Source from the content-addressed store, hash-verified

1693
1694
1695def scan_local_file_digest(scan_dir: Path, relative_path: str) -> str:
1696 digest = hashlib.sha256()
1697 with open_scan_local_file(scan_dir, relative_path) as source:
1698 for chunk in iter(lambda: source.read(1024 * 1024), b""):
1699 digest.update(chunk)
1700 return f"sha256:{digest.hexdigest()}"
1701
1702
1703def published_manifest_digest(scan_dir: Path, manifest: dict[str, Any]) -> str:

Callers 2

Calls 1

open_scan_local_fileFunction · 0.85

Tested by

no test coverage detected