pub trait AesBlockCipher:
'static
+ Clone
+ Sync
+ Send {
type Key: 'static + Clone + Sync + Send;
const BLOCK_COUNT_HINT: usize;
// Required methods
fn new_with_key(key: Self::Key) -> Self;
fn encrypt_many<const N: usize>(&self, blocks: [U8x16; N]) -> [U8x16; N]
where ArrayUnrolledOps: UnrollableArraySize<N>;
// Provided method
fn encrypt(&self, block: U8x16) -> U8x16 { ... }
}Expand description
An AES block cipher, suitable for encryption.
This cipher can be used for encryption. Decryption operations are handled in the subtrait
AesBlockCipherDecrypt.
Required Associated Constants§
Sourceconst BLOCK_COUNT_HINT: usize
const BLOCK_COUNT_HINT: usize
Running encrypt_many with this many blocks will typically result in good
performance.
Required Associated Types§
Required Methods§
Sourcefn new_with_key(key: Self::Key) -> Self
fn new_with_key(key: Self::Key) -> Self
Run the AES key schedule operation with a given key.
Sourcefn encrypt_many<const N: usize>(&self, blocks: [U8x16; N]) -> [U8x16; N]where
ArrayUnrolledOps: UnrollableArraySize<N>,
fn encrypt_many<const N: usize>(&self, blocks: [U8x16; N]) -> [U8x16; N]where
ArrayUnrolledOps: UnrollableArraySize<N>,
Encrypt an array of N 128-bit AES blocks using ECB mode.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".