pub struct CmacAes128;Expand description
CMAC-AES-128 message authentication code (16-byte tag).
Uses cmac 0.8 with aes 0.9 (cipher 0.5 trait chain).
Trait Implementations§
Source§impl Clone for CmacAes128
impl Clone for CmacAes128
Source§fn clone(&self) -> CmacAes128
fn clone(&self) -> CmacAes128
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CmacAes128
impl Debug for CmacAes128
Source§impl Default for CmacAes128
impl Default for CmacAes128
Source§fn default() -> CmacAes128
fn default() -> CmacAes128
Returns the “default value” for a type. Read more
Source§impl Mac for CmacAes128
impl Mac for CmacAes128
Source§fn key_len(&self) -> usize
fn key_len(&self) -> usize
Required key length (minimum acceptable length; MACs are often variable).
Source§fn output_len(&self) -> usize
fn output_len(&self) -> usize
Output tag length in bytes.
Source§fn mac(&self, key: &[u8], msg: &[u8], out: &mut [u8]) -> Result<(), CryptoError>
fn mac(&self, key: &[u8], msg: &[u8], out: &mut [u8]) -> Result<(), CryptoError>
Compute a MAC tag for
msg under key and write it into out.Source§fn verify(&self, key: &[u8], msg: &[u8], tag: &[u8]) -> Result<(), CryptoError>
fn verify(&self, key: &[u8], msg: &[u8], tag: &[u8]) -> Result<(), CryptoError>
Verify a MAC tag in constant time. Read more
Source§fn mac_to_vec(&self, key: &[u8], msg: &[u8]) -> Result<Vec<u8>, CryptoError>
fn mac_to_vec(&self, key: &[u8], msg: &[u8]) -> Result<Vec<u8>, CryptoError>
Convenience: compute MAC and return the tag as a
Vec<u8>.impl Copy for CmacAes128
Auto Trait Implementations§
impl Freeze for CmacAes128
impl RefUnwindSafe for CmacAes128
impl Send for CmacAes128
impl Sync for CmacAes128
impl Unpin for CmacAes128
impl UnsafeUnpin for CmacAes128
impl UnwindSafe for CmacAes128
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more