pub struct Hasher { /* private fields */ }
Expand description
A Hasher
can be reused to compute multiple hashes using the same key
Implementations§
source§impl Hasher
impl Hasher
sourcepub fn new(key: Key, personalization: Option<&[u8]>) -> Hasher
pub fn new(key: Key, personalization: Option<&[u8]>) -> Hasher
Creates a new Hasher
object using key
personalization
is an optional context that describes the purpose
of the hashes this Hasher
will compute.
The same key used with the same messages, but in different contexts will
produce different outputs.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Hasher
impl RefUnwindSafe for Hasher
impl Send for Hasher
impl Sync for Hasher
impl Unpin for Hasher
impl UnwindSafe for Hasher
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