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

Function _get_mpint

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

Big integer.

(data: memoryview)

Source from the content-addressed store, hash-verified

233
234
235def _get_mpint(data: memoryview) -> tuple[int, memoryview]:
236 """Big integer."""
237 val, data = _get_sshstr(data)
238 if val and val[0] > 0x7F:
239 raise ValueError("Invalid data")
240 return int.from_bytes(val, "big"), data
241
242
243def _to_mpint(val: int) -> bytes:

Callers 6

get_publicMethod · 0.85
load_privateMethod · 0.85
get_publicMethod · 0.85
load_privateMethod · 0.85
load_privateMethod · 0.85
verify_cert_signatureMethod · 0.85

Calls 2

_get_sshstrFunction · 0.85
from_bytesMethod · 0.80

Tested by

no test coverage detected