2 releases

0.1.1 Oct 11, 2021
0.1.0 Oct 11, 2021

#1116 in Cryptography

Download history 97/week @ 2024-03-11 106/week @ 2024-03-18 137/week @ 2024-03-25 139/week @ 2024-04-01 76/week @ 2024-04-08 105/week @ 2024-04-15 102/week @ 2024-04-22 89/week @ 2024-04-29 136/week @ 2024-05-06 99/week @ 2024-05-13 77/week @ 2024-05-20 123/week @ 2024-05-27 76/week @ 2024-06-03 69/week @ 2024-06-10 90/week @ 2024-06-17 66/week @ 2024-06-24

330 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