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§
type Decrypter: AesDecrypt<KEY_LEN, Encrypter = Self>
Required Methods§
fn decrypter(&self) -> Self::Decrypter
fn encrypt_block(&self, plaintext: AesBlock) -> AesBlock
Sourcefn encrypt_2_blocks(&self, plaintext: AesBlockX2) -> AesBlockX2
fn encrypt_2_blocks(&self, plaintext: AesBlockX2) -> AesBlockX2
Encrypt two blocks, using the same key
Sourcefn encrypt_4_blocks(&self, plaintext: AesBlockX4) -> AesBlockX4
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.