SshWireWriter¶
Accumulates SSH wire format bytes. Call val_bytes() to get the final val bytes.
Constructors¶
create¶
Returns¶
- SshWireWriter iso^
Public Functions¶
write_byte¶
Parameters¶
- value: U8 val
Returns¶
- None val
write_bool¶
Parameters¶
- value: Bool val
Returns¶
- None val
write_u32¶
Parameters¶
- value: U32 val
Returns¶
- None val
write_string¶
SSH string: uint32 length followed by data bytes.
Parameters¶
Returns¶
- None val
write_string_from_str¶
SSH string from Pony String.
Parameters¶
- value: String val
Returns¶
- None val
write_name_list¶
SSH name-list: comma-separated string.
Parameters¶
Returns¶
- None val
write_mpint¶
SSH mpint: uint32 length + big-endian two's-complement bytes. The value is first canonicalized (redundant leading 0x00 bytes stripped) so the encoding matches every other implementation's — OpenSSH canonicalizes, and a non-canonical encoding of the X25519 shared secret would make the exchange hash disagree. A single leading zero is then re-added only when the high bit is set, to keep the value non-negative.
Parameters¶
Returns¶
- None val
val_bytes¶
Collect all chunks into a single contiguous Array[U8] val.