pub struct HexDigest<D: HexDigest> { /* private fields */ }Expand description
Utility wrapper around the hex-encoded final HMAC hash.
Implementations§
Source§impl<D: HexDigest> HexDigest<D>
impl<D: HexDigest> HexDigest<D>
Sourcepub fn decode(&self) -> Digest<D::Digest>
pub fn decode(&self) -> Digest<D::Digest>
Decodes the HexDigest into a raw Digest in constant-time.
Sourcepub const fn into_inner(self) -> D
pub const fn into_inner(self) -> D
Unwraps this HexDigest returning the hex-encoded byte array.
§Note
Comparing HexDigests should always be in constant-time, do not use into_inner prior to
checking equivalence between HexDigests. The HexDigest type’s PartialEq
implementations are all in constant-time. Either leverage these, or use this crate’s
ct_eq function.
Trait Implementations§
impl<D: Copy + HexDigest> Copy for HexDigest<D>
impl<D: HexDigest> Eq for HexDigest<D>
Auto Trait Implementations§
impl<D> Freeze for HexDigest<D>where
D: Freeze,
impl<D> RefUnwindSafe for HexDigest<D>where
D: RefUnwindSafe,
impl<D> Send for HexDigest<D>where
D: Send,
impl<D> Sync for HexDigest<D>where
D: Sync,
impl<D> Unpin for HexDigest<D>where
D: Unpin,
impl<D> UnwindSafe for HexDigest<D>where
D: 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