Crypt::Komihash - Komihash implementation in Perl
use Crypt::Komihash qw(komihash komihash_hex komirand_seed komirand64);
my $input = "Hello world";
my $seed = 0;
my $num = komihash($input, $seed); # 3745467240760726046
my $hex_str = komihash_hex($input, $seed); # 33fa929c7367d21e
komirand_seed($seed1, $seed2);
my $rand = komirand64();
Komihash is a super fast modern hashing algorithm that converts strings into 64bit integers. Mainly designed for hash-table, hash-map, and bloom-filter uses. As a bonus, Komihash also includes a pseudo random number generator.
Komihash: https://github.com/avaneev/komihash
Note: This module requires a 64bit CPU
returns 64bit integer hash for the given input and seed.
returns hex string hash for the given input and seed.
seed the Komirand PRNG with two 64bit unsigned integers
returns a random 64bit unsigned integer
Submit issues on Github: https://github.com/scottchiefbaker/perl-Crypt-Komihash/issues
- Crypt::xxHash
- Digest::FarmHash
- Digest::SpookyHash
- Digest::SHA
Scott Baker - https://www.perturb.org/