pub struct SipHasher(/* private fields */);
std::hash::DefaultHasher instead
An implementation of SipHash 2-4.
See: https://131002.net/siphash/
SipHash is a general-purpose hashing function: it runs at a good speed (competitive with Spooky and City) and permits strong keyed hashing. This lets you key your hash tables from a strong RNG, such as rand::os::OsRng.
Although the SipHash algorithm is considered to be generally strong, it is not intended for cryptographic purposes. As such, all cryptographic uses of this implementation are strongly discouraged.
impl SipHasher
pub fn new() -> SipHasher
std::hash::DefaultHasher instead
Creates a new SipHasher with the two initial keys set to 0.
pub fn new_with_keys(key0: u64, key1: u64) -> SipHasher
std::hash::DefaultHasher instead
Creates a SipHasher that is keyed off the provided keys.
impl Clone for SipHasher
fn clone(&self) -> SipHasher
fn clone_from(&mut self, source: &Self)
source. Read more
impl Debug for SipHasher
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
impl Default for SipHasher
impl Hasher for SipHasher
fn write(&mut self, msg: &[u8])
Hasher. Read more
fn write_str(&mut self, s: &str)
hasher_prefixfree_extras #96762)
str into this hasher. Read more
fn finish(&self) -> u64
fn write_u8(&mut self, i: u8)
u8 into this hasher.fn write_u16(&mut self, i: u16)
u16 into this hasher.fn write_u32(&mut self, i: u32)
u32 into this hasher.fn write_u64(&mut self, i: u64)
u64 into this hasher.fn write_u128(&mut self, i: u128)
u128 into this hasher.fn write_usize(&mut self, i: usize)
usize into this hasher.fn write_i8(&mut self, i: i8)
i8 into this hasher.fn write_i16(&mut self, i: i16)
i16 into this hasher.fn write_i32(&mut self, i: i32)
i32 into this hasher.fn write_i64(&mut self, i: i64)
i64 into this hasher.fn write_i128(&mut self, i: i128)
i128 into this hasher.fn write_isize(&mut self, i: isize)
isize into this hasher.fn write_length_prefix(&mut self, len: usize)
hasher_prefixfree_extras #96762)
impl Freeze for SipHasher
impl RefUnwindSafe for SipHasher
impl Send for SipHasher
impl Sync for SipHasher
impl Unpin for SipHasher
impl UnwindSafe for SipHasher
impl<T> Any for Twhere
T: 'static + ?Sized,impl<T> Borrow<T> for Twhere
T: ?Sized,impl<T> BorrowMut<T> for Twhere
T: ?Sized,impl<T> CloneToUninit for Twhere
T: Clone,unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit #126799)
impl<T> From<T> for T
fn from(t: T) -> T
Returns the argument unchanged.
impl<T, U> Into<U> for Twhere
U: From<T>,fn into(self) -> U
Calls U::from(self).
That is, this conversion is whatever the implementation of From<T> for U chooses to do.
impl<T> ToOwned for Twhere
T: Clone,type Owned = T
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)
impl<T, U> TryFrom<U> for Twhere
U: Into<T>,type Error = Infallible
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for Twhere
U: TryFrom<T>,
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/hash/struct.SipHasher.html