pub trait OpeningCipher {
    type Err: From<Error>;

    // Required methods
    fn size(&self) -> usize;
    fn open(&mut self, packet: Packet) -> Result<Vec<u8>, Self::Err>;
}
Expand description

A cipher able to open a Packet and retrieve it’s payload.

Required Associated Types§

source

type Err: From<Error>

The associated error type returned by the open method.

Required Methods§

source

fn size(&self) -> usize

The size of the Message Authentication Code for this OpeningCipher, in bytes.

source

fn open(&mut self, packet: Packet) -> Result<Vec<u8>, Self::Err>

Transform the Packet using the OpeningCipher into it’s decrypted payload.

Implementors§