SshDataReader
Defined in: src/protocols/ssh/binary/SshDataReader.ts:7
Stateful SSH primitive decoder that reads sequential values from a packet payload.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new SshDataReader(source: Uint8Array): SshDataReader;Defined in: src/protocols/ssh/binary/SshDataReader.ts:10
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
source | Uint8Array |
Returns
Section titled “Returns”SshDataReader
Accessors
Section titled “Accessors”remaining
Section titled “remaining”Get Signature
Section titled “Get Signature”get remaining(): number;Defined in: src/protocols/ssh/binary/SshDataReader.ts:12
Returns
Section titled “Returns”number
Methods
Section titled “Methods”assertFinished()
Section titled “assertFinished()”assertFinished(): void;Defined in: src/protocols/ssh/binary/SshDataReader.ts:85
Returns
Section titled “Returns”void
hasMore()
Section titled “hasMore()”hasMore(): boolean;Defined in: src/protocols/ssh/binary/SshDataReader.ts:16
Returns
Section titled “Returns”boolean
readBoolean()
Section titled “readBoolean()”readBoolean(): boolean;Defined in: src/protocols/ssh/binary/SshDataReader.ts:27
Returns
Section titled “Returns”boolean
readByte()
Section titled “readByte()”readByte(): number;Defined in: src/protocols/ssh/binary/SshDataReader.ts:20
Returns
Section titled “Returns”number
readBytes()
Section titled “readBytes()”readBytes(length: number): Buffer;Defined in: src/protocols/ssh/binary/SshDataReader.ts:31
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
length | number |
Returns
Section titled “Returns”Buffer
readMpint()
Section titled “readMpint()”readMpint(): Buffer;Defined in: src/protocols/ssh/binary/SshDataReader.ts:81
Reads an SSH mpint value (RFC 4251 §5): a length-prefixed two’s-complement
big-endian integer. Returns the raw magnitude bytes (non-negative integers
may have a leading 0x00 byte preserved by the caller as needed).
Returns
Section titled “Returns”Buffer
readNameList()
Section titled “readNameList()”readNameList(): string[];Defined in: src/protocols/ssh/binary/SshDataReader.ts:66
Returns
Section titled “Returns”string[]
readString()
Section titled “readString()”readString(): Buffer;Defined in: src/protocols/ssh/binary/SshDataReader.ts:54
Returns
Section titled “Returns”Buffer
readUint32()
Section titled “readUint32()”readUint32(): number;Defined in: src/protocols/ssh/binary/SshDataReader.ts:38
Returns
Section titled “Returns”number
readUint64()
Section titled “readUint64()”readUint64(): bigint;Defined in: src/protocols/ssh/binary/SshDataReader.ts:46
Returns
Section titled “Returns”bigint
readUtf8String()
Section titled “readUtf8String()”readUtf8String(): string;Defined in: src/protocols/ssh/binary/SshDataReader.ts:62
Returns
Section titled “Returns”string