pub struct Hmac<D> where
D: Update + BlockInput + FixedOutput + Reset + Default + Clone,
D::BlockSize: ArrayLength<u8>, { /* private fields */ }
Expand description
The Hmac
struct represents an HMAC using a given hash function D
.
Trait Implementations
sourceimpl<D> Clone for Hmac<D> where
D: Update + BlockInput + FixedOutput + Reset + Default + Clone,
D::BlockSize: ArrayLength<u8>,
impl<D> Clone for Hmac<D> where
D: Update + BlockInput + FixedOutput + Reset + Default + Clone,
D::BlockSize: ArrayLength<u8>,
sourceimpl<D> Debug for Hmac<D> where
D: Update + BlockInput + FixedOutput + Reset + Default + Clone + Debug,
D::BlockSize: ArrayLength<u8>,
impl<D> Debug for Hmac<D> where
D: Update + BlockInput + FixedOutput + Reset + Default + Clone + Debug,
D::BlockSize: ArrayLength<u8>,
sourceimpl<D> Mac for Hmac<D> where
D: Update + BlockInput + FixedOutput + Reset + Default + Clone,
D::BlockSize: ArrayLength<u8>,
D::OutputSize: ArrayLength<u8>,
impl<D> Mac for Hmac<D> where
D: Update + BlockInput + FixedOutput + Reset + Default + Clone,
D::BlockSize: ArrayLength<u8>,
D::OutputSize: ArrayLength<u8>,
type OutputSize = D::OutputSize
type OutputSize = D::OutputSize
Output size of the [Mac
]
sourcefn finalize_reset(&mut self) -> Output<Self>
fn finalize_reset(&mut self) -> Output<Self>
sourceimpl<D> NewMac for Hmac<D> where
D: Update + BlockInput + FixedOutput + Reset + Default + Clone,
D::BlockSize: ArrayLength<u8>,
D::OutputSize: ArrayLength<u8>,
impl<D> NewMac for Hmac<D> where
D: Update + BlockInput + FixedOutput + Reset + Default + Clone,
D::BlockSize: ArrayLength<u8>,
D::OutputSize: ArrayLength<u8>,
sourcefn new(key: &GenericArray<u8, Self::KeySize>) -> Self
fn new(key: &GenericArray<u8, Self::KeySize>) -> Self
Initialize new MAC instance from key with fixed size.
sourcefn new_varkey(key: &[u8]) -> Result<Self, InvalidKeyLength>
fn new_varkey(key: &[u8]) -> Result<Self, InvalidKeyLength>
Initialize new MAC instance from key with variable size. Read more
Auto Trait Implementations
impl<D> RefUnwindSafe for Hmac<D> where
D: RefUnwindSafe,
<<D as BlockInput>::BlockSize as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
impl<D> Send for Hmac<D> where
D: Send,
impl<D> Sync for Hmac<D> where
D: Sync,
impl<D> Unpin for Hmac<D> where
D: Unpin,
<<D as BlockInput>::BlockSize as ArrayLength<u8>>::ArrayType: Unpin,
impl<D> UnwindSafe for Hmac<D> where
D: UnwindSafe,
<<D as BlockInput>::BlockSize as ArrayLength<u8>>::ArrayType: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more