MCPcopy Create free account
hub / github.com/pyca/cryptography / _check_byteslike

Function _check_byteslike

src/cryptography/utils.py:34–38  ·  view source on GitHub ↗
(name: str, value: bytes)

Source from the content-addressed store, hash-verified

32
33
34def _check_byteslike(name: str, value: bytes) -> None:
35 try:
36 memoryview(value)
37 except TypeError:
38 raise TypeError(f"{name} must be bytes-like")
39
40
41def int_to_bytes(integer: int, length: typing.Optional[int] = None) -> bytes:

Callers 1

set_dataMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected