[−][src]Trait cmac::NewMac
Instantiate a Mac
algorithm.
Associated Types
type KeySize: ArrayLength<u8>
Key size in bytes with which cipher guaranteed to be initialized.
Required methods
fn new(key: &GenericArray<u8, Self::KeySize>) -> Self
Initialize new MAC instance from key with fixed size.
Provided methods
fn new_varkey(key: &[u8]) -> Result<Self, InvalidKeyLength>
Initialize new MAC instance from key with variable size.
Default implementation will accept only keys with length equal to
KeySize
, but some MACs can accept range of key lengths.
Implementors
impl<C> NewMac for Cmac<C> where
C: BlockCipher + NewBlockCipher + Clone,
GenericArray<u8, C::BlockSize>: Dbl,
[src]
C: BlockCipher + NewBlockCipher + Clone,
GenericArray<u8, C::BlockSize>: Dbl,