pub struct HmacStreamingAdapter<D: EagerHash>{ /* private fields */ }Expand description
Generic streaming MAC adapter wrapping hmac::Hmac<D>.
Implements StreamingMac: feed chunks with update, then consume with
finalize or verify.
Implementations§
Source§impl<D: EagerHash> HmacStreamingAdapter<D>
impl<D: EagerHash> HmacStreamingAdapter<D>
Sourcepub fn new(key: &[u8]) -> Result<Self, CryptoError>
pub fn new(key: &[u8]) -> Result<Self, CryptoError>
Create a new streaming adapter with the given key.
Returns CryptoError::InvalidKey if the key is rejected by HMAC.
Trait Implementations§
Source§impl<D: EagerHash + Send> StreamingMac for HmacStreamingAdapter<D>
impl<D: EagerHash + Send> StreamingMac for HmacStreamingAdapter<D>
Auto Trait Implementations§
impl<D> Freeze for HmacStreamingAdapter<D>
impl<D> RefUnwindSafe for HmacStreamingAdapter<D>where
Hmac<D>: Sized,
<D as EagerHash>::Core: RefUnwindSafe,
<<D as SmallBlockSizeUser>::_BlockSize as ArraySize>::ArrayType<u8>: RefUnwindSafe,
impl<D> Send for HmacStreamingAdapter<D>
impl<D> Sync for HmacStreamingAdapter<D>
impl<D> Unpin for HmacStreamingAdapter<D>
impl<D> UnsafeUnpin for HmacStreamingAdapter<D>where
Hmac<D>: Sized,
<D as EagerHash>::Core: UnsafeUnpin,
<<D as SmallBlockSizeUser>::_BlockSize as ArraySize>::ArrayType<u8>: UnsafeUnpin,
impl<D> UnwindSafe for HmacStreamingAdapter<D>where
Hmac<D>: Sized,
<D as EagerHash>::Core: UnwindSafe,
<<D as SmallBlockSizeUser>::_BlockSize as ArraySize>::ArrayType<u8>: UnwindSafe,
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