MCPcopy Index your code
hub / github.com/github/copilot-sdk / _verify_checksum

Function _verify_checksum

python/copilot/_cli_download.py:148–154  ·  view source on GitHub ↗

Verify SHA-256 checksum of downloaded data.

(data: bytes, expected_hash: str, filename: str)

Source from the content-addressed store, hash-verified

146
147
148def _verify_checksum(data: bytes, expected_hash: str, filename: str) -> None:
149 """Verify SHA-256 checksum of downloaded data."""
150 actual = hashlib.sha256(data).hexdigest()
151 if actual != expected_hash:
152 raise RuntimeError(
153 f"Checksum mismatch for {filename}:\n expected: {expected_hash}\n actual: {actual}"
154 )
155
156
157def _extract_tar_gz(data: bytes, binary_name: str, dest_dir: Path) -> Path:

Callers 1

download_cliFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…