Skip to main content

xxh32

Function xxh32 

Source
pub const fn xxh32(data: &[u8]) -> u32
Expand description

Compute the XXH32 hash of data in a single call.

Available as a const fn for compile-time hashing with seed=0.

ยงExample

use xxhash::xxh32;

let hash: u32 = xxh32(b"hello");
assert_eq!(hash, 0xFB0077F9);