AesEncrypt

Trait AesEncrypt 

Source
pub trait AesEncrypt<const KEY_LEN: usize>:
    From<[u8; KEY_LEN]>
    + Sealed
    + Debug
    + Clone {
    type Decrypter: AesDecrypt<KEY_LEN, Encrypter = Self>;

    // Required methods
    fn decrypter(&self) -> Self::Decrypter;
    fn encrypt_block(&self, plaintext: AesBlock) -> AesBlock;
    fn encrypt_2_blocks(&self, plaintext: AesBlockX2) -> AesBlockX2;
    fn encrypt_4_blocks(&self, plaintext: AesBlockX4) -> AesBlockX4;
}

Required Associated Types§

Source

type Decrypter: AesDecrypt<KEY_LEN, Encrypter = Self>

Required Methods§

Source

fn decrypter(&self) -> Self::Decrypter

Source

fn encrypt_block(&self, plaintext: AesBlock) -> AesBlock

Source

fn encrypt_2_blocks(&self, plaintext: AesBlockX2) -> AesBlockX2

Encrypt two blocks, using the same key

Source

fn encrypt_4_blocks(&self, plaintext: AesBlockX4) -> AesBlockX4

Encrypt four blocks, using the same key

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§