MCPcopy
hub / github.com/aws/aws-cli / _get_b64_sha256

Function _get_b64_sha256

backends/pep517.py:294–299  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

292
293
294def _get_b64_sha256(path):
295 with open(path, "rb") as f:
296 file_bytes = f.read()
297 digest_bytes = hashlib.sha256(file_bytes).digest()
298 encoded = base64.urlsafe_b64encode(digest_bytes).rstrip(b"=")
299 return encoded.decode("utf-8")
300
301
302@contextlib.contextmanager

Callers 1

_create_record_fileFunction · 0.70

Calls 3

decodeMethod · 0.80
readMethod · 0.45
digestMethod · 0.45

Tested by

no test coverage detected