Skip to main content

AesCipher

Trait AesCipher 

Source
pub trait AesCipher:
    BlockCipherEncrypt
    + KeyInit
    + Clone {
    type Dec: BlockCipherDecrypt + KeyInit;

    const KEY_LEN: usize;

    // Required method
    fn new_dec(key: &[u8]) -> Self::Dec;
}
Expand description

Trait for AES ciphers used in HCTR2.

Required Associated Constants§

Required Associated Types§

Required Methods§

Source

fn new_dec(key: &[u8]) -> Self::Dec

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.

Implementations on Foreign Types§

Source§

impl AesCipher for Aes128

Source§

const KEY_LEN: usize = 16

Source§

type Dec = Aes128Dec

Source§

fn new_dec(key: &[u8]) -> Self::Dec

Source§

impl AesCipher for Aes256

Source§

const KEY_LEN: usize = 32

Source§

type Dec = Aes256Dec

Source§

fn new_dec(key: &[u8]) -> Self::Dec

Implementors§