Struct SipHasher
struct SipHasher(_)
An implementation of SipHash 2-4.
See: https://github.com/veorq/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.
Implementations
impl SipHasher
fn new() -> SipHasherCreates a new
SipHasherwith the two initial keys set to 0.fn new_with_keys(key0: u64, key1: u64) -> SipHasherCreates a
SipHasherthat is keyed off the provided keys.
impl Clone for SipHasher
fn clone(self: &Self) -> SipHasher
impl Debug for SipHasher
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Default for SipHasher
fn default() -> SipHasher
impl Freeze for SipHasher
impl Hasher for SipHasher
fn write(self: &mut Self, msg: &[u8])fn write_str(self: &mut Self, s: &str)fn finish(self: &Self) -> u64
impl RefUnwindSafe for SipHasher
impl Send for SipHasher
impl Sync for SipHasher
impl Unpin for SipHasher
impl UnsafeUnpin for SipHasher
impl UnwindSafe for SipHasher
impl<T> Any for SipHasher
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for SipHasher
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for SipHasher
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for SipHasher
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for SipHasher
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into for SipHasher
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for SipHasher
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for SipHasher
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>