The random numbers created by the functions in this module are not meant for cryptographic purposes.
.Copyright © 2017-2022 Michael Truog
Version: 2.0.5 Oct 11 2022 19:03:19 ------------------------------------------------------------------------
Authors: Michael Truog (mjtruog at protonmail dot com).
The random numbers created by the functions in this module are not meant for cryptographic purposes.
Any functions that have a jenkins prefix use Bob Jenkins' lookup3 hashing (lookup3, May 2006). In my testing, the function jenkins_32 is 4 times slower than erlang:phash2/1 because jenkins_32 is implemented in Erlang. Both the jenkins_32 and jenkins_64 functions execute at a speed similar to crypto:hash(ripemd160,_) with crypto:hash(sha256,_) slightly faster and crypto:hash(sha512,_) slightly slower.
Any functions that have a jenkins64 prefix use Bob Jenkins' SpookyHash (SpookyV2, August 5 2012). In my testing, the function jenkins64_128 is 4.5 times slower than crypto:hash(md5,_) which provides the same number of bits, because the jenkins64 functions are implemented in Erlang.
The jenkins prefix functions are faster than the jenkins64 prefix functions due to avoiding Erlang bignums and both provide the same quality.
All the functions have been checked with the C++ implementations to ensure the same hash value is obtained, though this implementation forces numbers to be interpreted as big-endian.jenkins64_128(MessageRaw::iodata()) -> non_neg_integer()
jenkins64_128(MessageRaw::iodata(), Seed::non_neg_integer()) -> non_neg_integer()
jenkins64_32(MessageRaw::iodata()) -> non_neg_integer()
jenkins64_32(MessageRaw::iodata(), Seed::non_neg_integer()) -> non_neg_integer()
jenkins64_64(MessageRaw::iodata()) -> non_neg_integer()
jenkins64_64(MessageRaw::iodata(), Seed::non_neg_integer()) -> non_neg_integer()
jenkins_32(MessageRaw::iodata()) -> non_neg_integer()
jenkins_32(MessageRaw::iodata(), Seed::non_neg_integer()) -> non_neg_integer()
jenkins_64(MessageRaw::iodata()) -> non_neg_integer()
jenkins_64(MessageRaw::iodata(), Seed::non_neg_integer()) -> non_neg_integer()
Generated by EDoc