pub trait BlockCipher {
const BLOCK_LEN: usize;
// Required methods
fn encrypt(&self, block: &mut [u8]);
fn decrypt(&self, block: &mut [u8]);
}Expand description
Common interface for block ciphers.
Every cipher exposes in-place encrypt / decrypt operating on a byte
slice whose length must equal Self::BLOCK_LEN.
Required Associated Constants§
Required Methods§
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.