pub struct XxHash3_64 { /* private fields */ }Expand description
Calculates the 64-bit hash.
Implementations§
Source§impl Hasher
impl Hasher
Sourcepub fn oneshot(input: &[u8]) -> u64
pub fn oneshot(input: &[u8]) -> u64
Hash all data at once. If you can use this function, you may see noticable speed gains for certain types of input.
Sourcepub fn oneshot_with_seed(seed: u64, input: &[u8]) -> u64
pub fn oneshot_with_seed(seed: u64, input: &[u8]) -> u64
Hash all data at once using the provided seed and a secret derived from the seed. If you can use this function, you may see noticable speed gains for certain types of input.
Sourcepub fn oneshot_with_secret(
secret: &[u8],
input: &[u8],
) -> Result<u64, OneshotWithSecretError>
pub fn oneshot_with_secret( secret: &[u8], input: &[u8], ) -> Result<u64, OneshotWithSecretError>
Hash all data at once using the provided secret and the default seed. If you can use this function, you may see noticable speed gains for certain types of input.
Sourcepub fn oneshot_with_seed_and_secret(
seed: u64,
secret: &[u8],
input: &[u8],
) -> Result<u64, OneshotWithSecretError>
pub fn oneshot_with_seed_and_secret( seed: u64, secret: &[u8], input: &[u8], ) -> Result<u64, OneshotWithSecretError>
Hash all data at once using the provided seed and secret. If you can use this function, you may see noticable speed gains for certain types of input.
Source§impl Hasher
impl Hasher
Sourcepub fn with_seed(seed: u64) -> Hasher
pub fn with_seed(seed: u64) -> Hasher
Constructs the hasher using the provided seed and a secret derived from the seed.
Sourcepub fn with_seed_and_secret(
seed: u64,
secret: impl Into<Box<[u8]>>,
) -> Result<Hasher, SecretTooShortError<Box<[u8]>>>
pub fn with_seed_and_secret( seed: u64, secret: impl Into<Box<[u8]>>, ) -> Result<Hasher, SecretTooShortError<Box<[u8]>>>
Constructs the hasher using the provided seed and secret.
Sourcepub fn into_secret(self) -> Box<[u8]>
pub fn into_secret(self) -> Box<[u8]>
Returns the secret.
Trait Implementations§
Source§impl Hasher for Hasher
impl Hasher for Hasher
1.26.0 · Source§fn write_u128(&mut self, i: u128)
fn write_u128(&mut self, i: u128)
u128 into this hasher.1.3.0 · Source§fn write_usize(&mut self, i: usize)
fn write_usize(&mut self, i: usize)
usize into this hasher.1.26.0 · Source§fn write_i128(&mut self, i: i128)
fn write_i128(&mut self, i: i128)
i128 into this hasher.1.3.0 · Source§fn write_isize(&mut self, i: isize)
fn write_isize(&mut self, i: isize)
isize into this hasher.Source§fn write_length_prefix(&mut self, len: usize)
fn write_length_prefix(&mut self, len: usize)
hasher_prefixfree_extras)