Trait osshkeys::sshbuf::SshWriteExt[][src]

pub trait SshWriteExt {
    fn write_bool(&mut self, value: bool) -> Result<()>;
fn write_uint8(&mut self, value: u8) -> Result<()>;
fn write_uint32(&mut self, value: u32) -> Result<()>;
fn write_uint64(&mut self, value: u64) -> Result<()>;
fn write_string(&mut self, buf: &[u8]) -> Result<()>;
fn write_utf8(&mut self, value: &str) -> Result<()>;
fn write_mpint(&mut self, value: &BigNumRef) -> Result<()>; }
Expand description

io::Write extension to read ssh data

Required methods

Convert boolean to one byte and write it

By definition, false should be 0 and true should be 1. Any other value is not allowed.

Write a byte into the stream

Write 32 bits unsigned integer in big endian

Write 64 bits unsigned integer in big endian

Write binary string data

Before the binary string, there is a 32 bits unsigned integer to indicate the length of the data, and the binary string is NOT null-terminating.

Write UTF-8 string

Convert the string into bytes array and write it using write_string().

Write multiple precision integer

Convert the integer into bytes array and write it.

Implementors