Trait thrussh::cipher::CipherT [] [src]

pub trait CipherT {
    fn read<'a, R: BufRead>(&self, stream: &mut R, buffer: &'a mut SSHBuffer) -> Result<Option<&'a [u8]>, Error>;
    fn write(&self, packet: &[u8], buffer: &mut SSHBuffer);
}

Required Methods

fn read<'a, R: BufRead>(&self, stream: &mut R, buffer: &'a mut SSHBuffer) -> Result<Option<&'a [u8]>, Error>

Replace the buffer's content with the next deciphered packet from stream.

fn write(&self, packet: &[u8], buffer: &mut SSHBuffer)

Extend the buffer with the encrypted packet.

Implementors