Xiphoseer / sfhash

The `Hsieh Hash` or `SuperFastHash` function in Rust

Home Page:https://crates.io/crates/sfhash

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sfhash

This crate contains the SuperFastHash (aka Hsieh Hash) function presented at http://www.azillionmonkeys.com/qed/hash.html

use sfhash::digest;

let hash = digest("Hello World!".as_bytes());
assert_eq!(hash, 1774740540);

The hash value is initialized with the lenght of the input, so the algorithm cannot be used incrementally.

About

The `Hsieh Hash` or `SuperFastHash` function in Rust

https://crates.io/crates/sfhash

License:GNU Lesser General Public License v2.1


Languages

Language:Rust 100.0%