pub trait Aes256Ctr {
type Context: Send + Sync + Clone;
// Required methods
fn init(key: &[u8; 32], iv: &[u8; 16]) -> Self::Context;
fn apply_keystream(ctx: &mut Self::Context, buf: InOutBuf<'_, '_, u8>);
}Expand description
AES-256 CTR mode driver.
Required Associated Types§
Required Methods§
Sourcefn init(key: &[u8; 32], iv: &[u8; 16]) -> Self::Context
fn init(key: &[u8; 32], iv: &[u8; 16]) -> Self::Context
Initialize with a 256-bit key and 128-bit initial counter block.
Sourcefn apply_keystream(ctx: &mut Self::Context, buf: InOutBuf<'_, '_, u8>)
fn apply_keystream(ctx: &mut Self::Context, buf: InOutBuf<'_, '_, u8>)
XOR the keystream into buf.
The counter and any unused keystream are carried in the context, so
buf need not be block-aligned.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".