pub trait VerifiableMac {
// Required methods
fn mac(&self, mac_shared_secret: &Zeroizing<[u8; 32]>) -> impl Mac;
fn verify_mac(
&self,
mac_shared_secret: &Zeroizing<[u8; 32]>,
tag: &[u8],
) -> Result<(), MacError>;
// Provided method
fn finalized_mac(&self, mac_shared_secret: &Zeroizing<[u8; 32]>) -> Vec<u8> ⓘ { ... }
}Expand description
Generates and verifies HMAC tags for key authentication.
Required Methods§
Provided 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.