pub trait Mac: Clone {
type OutputSize: ArrayLength<u8>;
// Required methods
fn update(&mut self, data: &[u8]);
fn reset(&mut self);
fn finalize(self) -> Output<Self>;
// Provided methods
fn finalize_reset(&mut self) -> Output<Self> { ... }
fn verify(self, tag: &[u8]) -> Result<(), MacError> { ... }
}
Expand description
The Mac
trait defines methods for a Message Authentication algorithm.
Required Associated Types§
Sourcetype OutputSize: ArrayLength<u8>
type OutputSize: ArrayLength<u8>
Output size of the [Mac
]
Required Methods§
Provided Methods§
Sourcefn finalize_reset(&mut self) -> Output<Self>
fn finalize_reset(&mut self) -> Output<Self>
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.