pub struct Cmac<C: CmacCipher> { /* private fields */ }Expand description
Generic CMAC instance.
Trait Implementations§
Source§impl<C: CmacCipher + AlgorithmName> AlgorithmName for Cmac<C>
impl<C: CmacCipher + AlgorithmName> AlgorithmName for Cmac<C>
Source§fn write_alg_name(f: &mut Formatter<'_>) -> Result
fn write_alg_name(f: &mut Formatter<'_>) -> Result
Write algorithm name into
f.Source§impl<C: CmacCipher> BlockSizeUser for Cmac<C>
impl<C: CmacCipher> BlockSizeUser for Cmac<C>
Source§fn block_size() -> usize
fn block_size() -> usize
Return block size in bytes.
Source§impl<C: CmacCipher> Clone for Cmac<C>
impl<C: CmacCipher> Clone for Cmac<C>
Source§impl<C: CmacCipher> CoreProxy for Cmac<C>
impl<C: CmacCipher> CoreProxy for Cmac<C>
Source§impl<C: CmacCipher> Debug for Cmac<C>
impl<C: CmacCipher> Debug for Cmac<C>
Source§impl<C: CmacCipher> FixedOutput for Cmac<C>
impl<C: CmacCipher> FixedOutput for Cmac<C>
Source§fn finalize_into(self, out: &mut Output<Self>)
fn finalize_into(self, out: &mut Output<Self>)
Consume value and write result into provided array.
Source§fn finalize_fixed(self) -> Array<u8, Self::OutputSize>
fn finalize_fixed(self) -> Array<u8, Self::OutputSize>
Retrieve result and consume the hasher instance.
Source§impl<C: CmacCipher> FixedOutputReset for Cmac<C>
impl<C: CmacCipher> FixedOutputReset for Cmac<C>
Source§fn finalize_into_reset(&mut self, out: &mut Output<Self>)
fn finalize_into_reset(&mut self, out: &mut Output<Self>)
Write result into provided array and reset the hasher state.
Source§fn finalize_fixed_reset(&mut self) -> Array<u8, Self::OutputSize>
fn finalize_fixed_reset(&mut self) -> Array<u8, Self::OutputSize>
Retrieve result and reset the hasher state.
Source§impl<C: CmacCipher> InnerInit for Cmac<C>
impl<C: CmacCipher> InnerInit for Cmac<C>
Source§fn inner_init(inner: Self::Inner) -> Self
fn inner_init(inner: Self::Inner) -> Self
Initialize value from the
inner.Source§impl<C: CmacCipher> InnerUser for Cmac<C>
impl<C: CmacCipher> InnerUser for Cmac<C>
Source§impl<C: CmacCipher> OutputSizeUser for Cmac<C>
impl<C: CmacCipher> OutputSizeUser for Cmac<C>
Source§type OutputSize = <CmacCore<C> as OutputSizeUser>::OutputSize
type OutputSize = <CmacCore<C> as OutputSizeUser>::OutputSize
Size of the output in bytes.
Source§fn output_size() -> usize
fn output_size() -> usize
Return output size in bytes.
Source§impl<C: CmacCipher> Reset for Cmac<C>
impl<C: CmacCipher> Reset for Cmac<C>
Source§impl<C: CmacCipher> Update for Cmac<C>
impl<C: CmacCipher> Update for Cmac<C>
impl<C: CmacCipher> MacMarker for Cmac<C>
Auto Trait Implementations§
impl<C> Freeze for Cmac<C>
impl<C> RefUnwindSafe for Cmac<C>where
C: RefUnwindSafe,
<<C as BlockSizeUser>::BlockSize as ArraySize>::ArrayType<u8>: RefUnwindSafe,
impl<C> Send for Cmac<C>where
C: Send,
impl<C> Sync for Cmac<C>where
C: Sync,
impl<C> Unpin for Cmac<C>
impl<C> UnwindSafe for Cmac<C>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<D> DynDigest for D
impl<D> DynDigest for D
Source§fn finalize_into(self, buf: &mut [u8]) -> Result<(), InvalidBufferSize>
fn finalize_into(self, buf: &mut [u8]) -> Result<(), InvalidBufferSize>
Write result into provided array and consume the hasher instance. Read more
Source§fn finalize_into_reset(
&mut self,
buf: &mut [u8],
) -> Result<(), InvalidBufferSize>
fn finalize_into_reset( &mut self, buf: &mut [u8], ) -> Result<(), InvalidBufferSize>
Write result into provided array and reset the hasher instance. Read more
Source§fn output_size(&self) -> usize
fn output_size(&self) -> usize
Get output size of the hasher
Source§impl<T> KeyInit for T
impl<T> KeyInit for T
Source§fn new(key: &Array<u8, <T as KeySizeUser>::KeySize>) -> T
fn new(key: &Array<u8, <T as KeySizeUser>::KeySize>) -> T
Create new value from fixed size key.
Source§fn new_from_slice(key: &[u8]) -> Result<T, InvalidLength>
fn new_from_slice(key: &[u8]) -> Result<T, InvalidLength>
Create new value from variable size key.
Source§fn weak_key_test(
key: &Array<u8, <T as KeySizeUser>::KeySize>,
) -> Result<(), WeakKeyError>
fn weak_key_test( key: &Array<u8, <T as KeySizeUser>::KeySize>, ) -> Result<(), WeakKeyError>
Check if the key might be considered weak.
Source§fn new_checked(key: &Array<u8, Self::KeySize>) -> Result<Self, WeakKeyError>
fn new_checked(key: &Array<u8, Self::KeySize>) -> Result<Self, WeakKeyError>
Create new value from fixed size key after checking it for weakness.
Source§impl<T> KeySizeUser for T
impl<T> KeySizeUser for T
Source§impl<T> Mac for T
impl<T> Mac for T
Source§fn chain_update(self, data: impl AsRef<[u8]>) -> T
fn chain_update(self, data: impl AsRef<[u8]>) -> T
Process input data in a chained manner.
Source§fn finalize_reset(&mut self) -> CtOutput<T>where
T: FixedOutputReset,
fn finalize_reset(&mut self) -> CtOutput<T>where
T: FixedOutputReset,
Source§fn verify(
self,
tag: &Array<u8, <T as OutputSizeUser>::OutputSize>,
) -> Result<(), MacError>
fn verify( self, tag: &Array<u8, <T as OutputSizeUser>::OutputSize>, ) -> Result<(), MacError>
Check if tag/code value is correct for the processed input.
Source§fn verify_reset(
&mut self,
tag: &Array<u8, <T as OutputSizeUser>::OutputSize>,
) -> Result<(), MacError>where
T: FixedOutputReset,
fn verify_reset(
&mut self,
tag: &Array<u8, <T as OutputSizeUser>::OutputSize>,
) -> Result<(), MacError>where
T: FixedOutputReset,
Check if tag/code value is correct for the processed input and reset
Mac instance.Source§fn verify_slice(self, tag: &[u8]) -> Result<(), MacError>
fn verify_slice(self, tag: &[u8]) -> Result<(), MacError>
Check truncated tag correctness using all bytes
of calculated tag. Read more