MCPcopy Create free account
hub / github.com/Keeper-Security/Commander / ssh_agent_encode_long

Function ssh_agent_encode_long

keepercommander/commands/ssh_agent.py:120–125  ·  view source on GitHub ↗
(long_value)

Source from the content-addressed store, hash-verified

118
119
120def ssh_agent_encode_long(long_value): # type: (int) -> bytes
121 length = (long_value.bit_length() + 7) // 8
122 b = long_value.to_bytes(length=length, byteorder='big')
123 if b[0] >= 0x80:
124 b = b'\x00' + b
125 return ssh_agent_encode_bytes(b)
126
127
128def ssh_agent_get_next_value(buffer, position): # type: (bytes, int) -> Tuple[bytes, int]

Callers 3

add_ssh_keyFunction · 0.85
load_private_keysMethod · 0.85

Calls 1

ssh_agent_encode_bytesFunction · 0.85

Tested by

no test coverage detected