2 releases
0.1.1 | Oct 11, 2021 |
---|---|
0.1.0 | Oct 11, 2021 |
#1116 in Cryptography
330 downloads per month
Used in 2 crates
(via assembly-fdb-core)
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.