Trait osshkeys::sshbuf::SshReadExt[][src]

pub trait SshReadExt {
    fn read_bool(&mut self) -> Result<bool>;
fn read_uint8(&mut self) -> Result<u8>;
fn read_uint32(&mut self) -> Result<u32>;
fn read_uint64(&mut self) -> Result<u64>;
fn read_string(&mut self) -> Result<Vec<u8>>;
fn read_utf8(&mut self) -> Result<String>;
fn read_mpint(&mut self) -> Result<BigNum>; }
Expand description

io::Read extension to read ssh data

Required methods

Read a byte and convert it to boolean

By definition, all non-zero value would be interpreted as true.

Read a byte from the stream

Read 32 bits unsigned integer in big endian

Read 64 bits unsigned integer in big endian

Read bytes array or string

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.

Read UTF-8 string

This actually does the same thing as read_string() does. But it also convert the binary data to String.

Read multiple precision integer

Although it can contain negative number, but we don’t support it currently. Integers which is longer than 16384 bits are also not supporting.

Implementors