Struct SipHasher24

struct SipHasher24 { ... }

An implementation of SipHash 2-4.

See: https://www.aumasson.jp/siphash/siphash.pdf

Implementations

impl SipHasher24

fn new() -> SipHasher24

Creates a new SipHasher24 with the two initial keys set to 0.

fn new_with_keys(key0: u64, key1: u64) -> SipHasher24

Creates a SipHasher24 that is keyed off the provided keys.

fn new_with_key(key: &[u8; 16]) -> SipHasher24

Creates a SipHasher24 from a 16 byte key.

fn keys(self: &Self) -> (u64, u64)

Get the keys used by this hasher

fn key(self: &Self) -> [u8; 16]

Get the key used by this hasher as a 16 byte vector

fn hash(self: &Self, bytes: &[u8]) -> u64

Hash a byte array - This is the easiest and safest way to use SipHash.

impl Clone for SipHasher24

fn clone(self: &Self) -> SipHasher24

impl Copy for SipHasher24

impl Debug for SipHasher24

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl Default for SipHasher24

fn default() -> SipHasher24

impl Freeze for SipHasher24

impl Hasher for SipHasher24

fn write(self: &mut Self, msg: &[u8])
fn finish(self: &Self) -> u64
fn write_usize(self: &mut Self, i: usize)
fn write_u8(self: &mut Self, i: u8)
fn write_u16(self: &mut Self, i: u16)
fn write_u32(self: &mut Self, i: u32)
fn write_u64(self: &mut Self, i: u64)

impl RefUnwindSafe for SipHasher24

impl Send for SipHasher24

impl Sync for SipHasher24

impl Unpin for SipHasher24

impl UnsafeUnpin for SipHasher24

impl UnwindSafe for SipHasher24

impl<T> Any for SipHasher24

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for SipHasher24

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for SipHasher24

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for SipHasher24

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for SipHasher24

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into for SipHasher24

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for SipHasher24

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for SipHasher24

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>