pub trait ChunkEncrypt {
type Encrypted;
// Required method
fn encrypt_with(&self, key: &EncryptionKey) -> Result<Self::Encrypted>;
// Provided method
fn encrypt(&self) -> Result<Self::Encrypted> { ... }
}Expand description
Trait for encrypting chunks with a Keccak-256 counter-mode cipher.
Required Associated Types§
Required Methods§
Sourcefn encrypt_with(&self, key: &EncryptionKey) -> Result<Self::Encrypted>
fn encrypt_with(&self, key: &EncryptionKey) -> Result<Self::Encrypted>
Encrypt with a caller-provided key.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
Source§impl<const BODY_SIZE: usize> ChunkEncrypt for ContentChunk<BODY_SIZE>
Available on crate feature encryption only.
impl<const BODY_SIZE: usize> ChunkEncrypt for ContentChunk<BODY_SIZE>
Available on crate feature
encryption only.