pub trait ShortMac<const MAC_LEN: usize> {
// Required methods
fn mac(&self, input: &[u8]) -> CtByteArray<MAC_LEN>;
fn validate(&self, input: &[u8], mac: &[u8; MAC_LEN]) -> Choice;
}
Expand description
A simple trait to describe a keyed message authentication code.
Unlike RustCrypto’s
crypto_mac::Mac
,
this trait does not support incremental processing.
Required Methods§
Sourcefn mac(&self, input: &[u8]) -> CtByteArray<MAC_LEN>
fn mac(&self, input: &[u8]) -> CtByteArray<MAC_LEN>
Calculate a message authentication code for input
using this key.