NIF bindings for XXH3 hash functions implemented in Rust
XXH3 is a new speed-optimized hash algorithm of the xxHash family of non-cryptographic hash functions, featuring:Speed analysis methodology is explained here:
https://fastcompression.blogspot.com/2019/03/presenting-xxh3.htmlhash128/1 | Returns 128-bit hash for the given Data . |
hash128/2 | Returns 128-bit hash for the given Data with Seed value. |
hash128_with_secret/2 | Returns 128-bit hash for the given Data with a custom Secret . |
hash64/1 | Returns 64-bit hash for the given Data . |
hash64/2 | Returns 64-bit hash for the given Data with Seed value. |
hash64_with_secret/2 | Returns 64-bit hash for the given Data with a custom Secret . |
hash128(Data::binary()) -> non_neg_integer()
Returns 128-bit hash for the given Data
.
hash128(Data::binary(), Seed::non_neg_integer()) -> non_neg_integer()
Returns 128-bit hash for the given Data
with Seed
value.
hash64/2
for more details.
hash128_with_secret(Data::binary(), Secret::binary()) -> non_neg_integer()
Returns 128-bit hash for the given Data
with a custom Secret
.
hash64_with_secret/2
for more details.
hash64(Data::binary()) -> non_neg_integer()
Returns 64-bit hash for the given Data
.
hash64(Data::binary(), Seed::non_neg_integer()) -> non_neg_integer()
Returns 64-bit hash for the given Data
with Seed
value.
Seed
value.
While this operation is decently fast, note that it's not completely free.
hash64_with_secret(Data::binary(), Secret::binary()) -> non_neg_integer()
Returns 64-bit hash for the given Data
with a custom Secret
.
Secret
size *must* be large enough (>= 136 bytes).
However, the quality of produced hash values depends on secret's entropy.
Technically, the secret must look like a bunch of random bytes.
Avoid "trivial" or structured data such as repeated sequences or a text document.
Generated by EDoc