Go to the latest version of this document.

# ``twisted`.`conch`.`ssh`.`common``

module documentation
(source)

Common functions for the SSH classes.

Function | `ffs` | first from second goes through the first list, looking for items in the second, returns the first one
Function | `getMP` | Get multiple precision integer out of the string. A multiple precision integer is stored as a 4-byte length followed by length bytes of the integer. If count is specified, get count integers out of the string...
Function | `getNS` | get net string
Function | `install` | Undocumented
Function | `MP` | Undocumented
Function | `NS` | net string

def ffs(c, s): (source)

first from second goes through the first list, looking for items in the second, returns the first one

@overload
def getMP(data: `bytes`) -> `tuple[int, bytes]`:
@overload
def getMP(data: `bytes`, count: `int`) -> `Sequence[int | bytes]`:
(source)

Get multiple precision integer out of the string. A multiple precision integer is stored as a 4-byte length followed by length bytes of the integer. If count is specified, get count integers out of the string. The return value is a tuple of count integers followed by the rest of the data.

def getNS(s: `bytes`, count: `int` = 1) -> `Sequence[bytes]`: (source)

get net string

def install(): (source)

Deprecated since version 16.5.0: `install` was deprecated in Twisted 16.5.0.

Undocumented

def MP(number: `int`) -> `bytes`: (source)

Undocumented

def NS(t: `bytes | str`) -> `bytes`: (source)

net string