Struct blake2::Blake2bMac [−][src]
pub struct Blake2bMac<OutSize> where
OutSize: ArrayLength<u8> + IsLessOrEqual<U64>,
LeEq<OutSize, U64>: NonZero, { /* fields omitted */ }
Expand description
Blake2b MAC function
Implementations
impl<OutSize> Blake2bMac<OutSize> where
OutSize: ArrayLength<u8> + IsLessOrEqual<U64>,
LeEq<OutSize, U64>: NonZero,
impl<OutSize> Blake2bMac<OutSize> where
OutSize: ArrayLength<u8> + IsLessOrEqual<U64>,
LeEq<OutSize, U64>: NonZero,
Create new instance using provided key, salt, and persona.
Key length should not be bigger than block size, salt and persona length should not be bigger than quarter of block size. If any of those conditions is false the method will return an error.
Trait Implementations
impl<OutSize: Clone> Clone for Blake2bMac<OutSize> where
OutSize: ArrayLength<u8> + IsLessOrEqual<U64>,
LeEq<OutSize, U64>: NonZero,
impl<OutSize: Clone> Clone for Blake2bMac<OutSize> where
OutSize: ArrayLength<u8> + IsLessOrEqual<U64>,
LeEq<OutSize, U64>: NonZero,
impl<OutSize> Debug for Blake2bMac<OutSize> where
OutSize: ArrayLength<u8> + IsLessOrEqual<U64>,
LeEq<OutSize, U64>: NonZero,
impl<OutSize> Debug for Blake2bMac<OutSize> where
OutSize: ArrayLength<u8> + IsLessOrEqual<U64>,
LeEq<OutSize, U64>: NonZero,
impl<OutSize> FixedOutput for Blake2bMac<OutSize> where
OutSize: ArrayLength<u8> + IsLessOrEqual<U64> + 'static,
LeEq<OutSize, U64>: NonZero,
impl<OutSize> FixedOutput for Blake2bMac<OutSize> where
OutSize: ArrayLength<u8> + IsLessOrEqual<U64> + 'static,
LeEq<OutSize, U64>: NonZero,
Consume value and write result into provided array.
Retrieve result and consume the hasher instance.
impl<OutSize> KeyInit for Blake2bMac<OutSize> where
OutSize: ArrayLength<u8> + IsLessOrEqual<U64>,
LeEq<OutSize, U64>: NonZero,
impl<OutSize> KeyInit for Blake2bMac<OutSize> where
OutSize: ArrayLength<u8> + IsLessOrEqual<U64>,
LeEq<OutSize, U64>: NonZero,
Create new value from variable size key.
impl<OutSize> KeySizeUser for Blake2bMac<OutSize> where
OutSize: ArrayLength<u8> + IsLessOrEqual<U64>,
LeEq<OutSize, U64>: NonZero,
impl<OutSize> KeySizeUser for Blake2bMac<OutSize> where
OutSize: ArrayLength<u8> + IsLessOrEqual<U64>,
LeEq<OutSize, U64>: NonZero,
impl<OutSize> OutputSizeUser for Blake2bMac<OutSize> where
OutSize: ArrayLength<u8> + IsLessOrEqual<U64> + 'static,
LeEq<OutSize, U64>: NonZero,
impl<OutSize> OutputSizeUser for Blake2bMac<OutSize> where
OutSize: ArrayLength<u8> + IsLessOrEqual<U64> + 'static,
LeEq<OutSize, U64>: NonZero,
type OutputSize = OutSize
type OutputSize = OutSize
Size of the output in bytes.
impl<OutSize> Update for Blake2bMac<OutSize> where
OutSize: ArrayLength<u8> + IsLessOrEqual<U64>,
LeEq<OutSize, U64>: NonZero,
impl<OutSize> Update for Blake2bMac<OutSize> where
OutSize: ArrayLength<u8> + IsLessOrEqual<U64>,
LeEq<OutSize, U64>: NonZero,
impl<OutSize> MacMarker for Blake2bMac<OutSize> where
OutSize: ArrayLength<u8> + IsLessOrEqual<U64>,
LeEq<OutSize, U64>: NonZero,
Auto Trait Implementations
impl<OutSize> RefUnwindSafe for Blake2bMac<OutSize> where
OutSize: RefUnwindSafe,
impl<OutSize> Send for Blake2bMac<OutSize> where
OutSize: Send,
impl<OutSize> Sync for Blake2bMac<OutSize> where
OutSize: Sync,
impl<OutSize> Unpin for Blake2bMac<OutSize> where
OutSize: Unpin,
impl<OutSize> UnwindSafe for Blake2bMac<OutSize> where
OutSize: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Create new value from fixed size key.
Create new value from variable size key.
pub fn verify(
self,
tag: &GenericArray<u8, <T as OutputSizeUser>::OutputSize>
) -> Result<(), MacError>
pub fn verify(
self,
tag: &GenericArray<u8, <T as OutputSizeUser>::OutputSize>
) -> Result<(), MacError>
Check if tag/code value is correct for the processed input.
Check truncated tag correctness using all bytes of calculated tag. Read more
Check truncated tag correctness using left side bytes
(i.e. tag[..n]
) of calculated tag. Read more