String::CityHash

CityHash wrapper for Perl
Download

String::CityHash Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Alessandro Ghedini
  • Publisher web site:
  • http://search.cpan.org/~alexbio/

String::CityHash Tags


String::CityHash Description

String::CityHash is a family of non-cryptographic hash functions for strings. It provides hash functions designed for fast hashing of strings. The functions mix the input bits thoroughly but are not suitable for cryptography. CityHash is intended to be fast, under the constraint that it hashes very well.SYNOPSIS use String::CityHash qw(cityhash64 cityhash128); my $str = "Some string to be hashed"; my $seed0 = 0x9ae16a3b2f90404f; my $seed1 = 0xc3a5c85c97cb3130; my $hash1 = cityhash64($str); # as integer my $hash2 = cityhash64($str, $seed0); # as integer my $hash3 = cityhash64($str, $seed0, $seed1); # as integer my $hash4 = cityhash64_bits($str); # 8-byte string holding int my $hash5 = cityhash64_bits($str, $seed0); my $hash6 = cityhash64_bits($str, $seed0, $seed1); my ($l,$h) = cityhash128($str); # low and high 64-bit parts, # as integers my $hash7 = cityhash128_bits($str); # 16-byte string holding low # then high 64-bit integersProduct's homepage


String::CityHash Related Software