Skip to main content

fnv1a

Function fnv1a 

Source
pub fn fnv1a(text: &str) -> u64
Expand description

The 64-bit FNV-1a hash of text. It is the same on each machine and with each Rust, so each job of the Gate gives a name the same part.

use hygiene::part::fnv1a;

assert_eq!(fnv1a(""), 0xcbf2_9ce4_8422_2325);
assert_eq!(fnv1a("a"), 0xaf63_dc4c_8601_ec8c);