Trait CipherMode

Source
pub trait CipherMode {
    const REQUIRES_IV: bool;
    const IS_AUTHENTICATED: bool;
    const IV_SIZE: usize;
    const TAG_SIZE: Option<usize>;

    // Required method
    fn name() -> &'static str;
}
Expand description

Marker trait for block cipher operating modes

Required Associated Constants§

Source

const REQUIRES_IV: bool

Whether the mode requires initialization vector/nonce

Source

const IS_AUTHENTICATED: bool

Whether this is an authenticated mode

Source

const IV_SIZE: usize

Size of the nonce/IV in bytes (if applicable)

Source

const TAG_SIZE: Option<usize>

Size of the tag in bytes (if applicable and authenticated)

Required Methods§

Source

fn name() -> &'static str

Mode name

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§