pub struct Hmac<T: GeneralHash>(/* private fields */);
Expand description
A hash computed from a RFC 2104 HMAC. Parameterized by the underlying hash function.
Trait Implementations§
Source§impl<'de, T: GeneralHash + Deserialize<'de>> Deserialize<'de> for Hmac<T>
Available on crate feature serde
only.
impl<'de, T: GeneralHash + Deserialize<'de>> Deserialize<'de> for Hmac<T>
Available on crate feature
serde
only.Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Hmac<T>, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Hmac<T>, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T: GeneralHash> GeneralHash for Hmac<T>
impl<T: GeneralHash> GeneralHash for Hmac<T>
Source§type Engine = HmacEngine<T>
type Engine = HmacEngine<T>
A hashing engine which bytes can be serialized into. It is expected
to implement the
io::Write
trait, and to never return errors under
any conditions.Source§fn from_engine(e: HmacEngine<T>) -> Hmac<T>
fn from_engine(e: HmacEngine<T>) -> Hmac<T>
Produces a hash from the current state of a given engine.
Source§fn hash_byte_chunks<B, I>(byte_slices: I) -> Self
fn hash_byte_chunks<B, I>(byte_slices: I) -> Self
Hashes all the byte slices retrieved from the iterator together.
Source§impl<T: GeneralHash> Hash for Hmac<T>
impl<T: GeneralHash> Hash for Hmac<T>
Source§fn from_byte_array(bytes: T::Bytes) -> Self
fn from_byte_array(bytes: T::Bytes) -> Self
Constructs a new hash from the underlying byte array.
Source§fn from_slice(sl: &[u8]) -> Result<Hmac<T>, FromSliceError>
fn from_slice(sl: &[u8]) -> Result<Hmac<T>, FromSliceError>
👎Deprecated since 0.15.0: use
from_byte_array
insteadCopies a byte slice into a hash object.
Source§fn to_byte_array(self) -> Self::Bytes
fn to_byte_array(self) -> Self::Bytes
Returns the underlying byte array.
Source§fn as_byte_array(&self) -> &Self::Bytes
fn as_byte_array(&self) -> &Self::Bytes
Returns a reference to the underlying byte array.
Source§const DISPLAY_BACKWARD: bool = false
const DISPLAY_BACKWARD: bool = false
Flag indicating whether user-visible serializations of this hash should be backward. Read more
Source§impl<T: Ord + GeneralHash> Ord for Hmac<T>
impl<T: Ord + GeneralHash> Ord for Hmac<T>
Source§impl<T: PartialOrd + GeneralHash> PartialOrd for Hmac<T>
impl<T: PartialOrd + GeneralHash> PartialOrd for Hmac<T>
impl<T: Copy + GeneralHash> Copy for Hmac<T>
impl<T: Eq + GeneralHash> Eq for Hmac<T>
impl<T: GeneralHash> StructuralPartialEq for Hmac<T>
Auto Trait Implementations§
impl<T> Freeze for Hmac<T>where
T: Freeze,
impl<T> RefUnwindSafe for Hmac<T>where
T: RefUnwindSafe,
impl<T> Send for Hmac<T>where
T: Send,
impl<T> Sync for Hmac<T>where
T: Sync,
impl<T> Unpin for Hmac<T>where
T: Unpin,
impl<T> UnwindSafe for Hmac<T>where
T: 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