2 releases

0.1.1 Oct 11, 2021
0.1.0 Oct 11, 2021

#1166 in Cryptography

Download history 71/week @ 2024-07-20 60/week @ 2024-07-27 72/week @ 2024-08-03 78/week @ 2024-08-10 64/week @ 2024-08-17 51/week @ 2024-08-24 54/week @ 2024-08-31 53/week @ 2024-09-07 47/week @ 2024-09-14 71/week @ 2024-09-21 79/week @ 2024-09-28 26/week @ 2024-10-05 37/week @ 2024-10-12 30/week @ 2024-10-19 37/week @ 2024-10-26 28/week @ 2024-11-02

134 downloads per month
Used in 2 crates (via assembly-fdb-core)

LGPL-2.1

12KB
54 lines

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.


lib.rs:

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.

No runtime deps