wyhash 0.3.0

Rust implementation of the WyHash fast portable non-cryptographic hashing algorithm and random number generator.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
// Example using the `core::hash::Hasher` interface.
// (Same as using `std::hash::Hasher`)

extern crate core;
extern crate wyhash;
use core::hash::Hasher;
use wyhash::WyHash;

fn main() {
    let mut hasher = WyHash::with_seed(3);
    hasher.write(&[0, 1, 2]);
    assert_eq!(0xb0f9_4152_0b1a_d95d, hasher.finish());
}