use crate::error::Result;
pub trait Operation<T> {
fn execute(self) -> Result<T>;
fn reset(&mut self);
}
pub trait Reusable<T, P> {
fn execute(&self, params: P) -> Result<T>;
}
pub trait WithAssociatedData<'a, T> {
fn with_associated_data(self, aad: &'a [u8]) -> T;
}
pub trait WithNonce<'a, N, T> {
fn with_nonce(self, nonce: &'a N) -> T;
}
pub trait WithOutputLength<T> {
fn with_output_length(self, length: usize) -> T;
}
pub trait WithData<'a, T> {
fn with_data(self, data: &'a [u8]) -> T;
}
pub enum OperationMode {
Standard,
Streaming,
InPlace,
}
pub mod aead;
pub mod kdf;
pub use aead::{AeadEncryptOperation, AeadDecryptOperation};
pub use kdf::KdfOperation;