MCPcopy
hub / github.com/pyca/cryptography / _get_u64

Function _get_u64

src/cryptography/hazmat/primitives/serialization/ssh.py:220–224  ·  view source on GitHub ↗

Uint64

(data: memoryview)

Source from the content-addressed store, hash-verified

218
219
220def _get_u64(data: memoryview) -> tuple[int, memoryview]:
221 """Uint64"""
222 if len(data) < 8:
223 raise ValueError("Invalid data")
224 return int.from_bytes(data[:8], byteorder="big"), data[8:]
225
226
227def _get_sshstr(data: memoryview) -> tuple[memoryview, memoryview]:

Callers 1

Calls 1

from_bytesMethod · 0.80

Tested by

no test coverage detected