NAME

String::CityHash - CityHash wrapper for Perl

VERSION

version 0.01

SYNOPSIS

use String::CityHash qw(cityhash64);

my $str = "Some string to be hashed";

my $seed0 = 0x9ae16a3b2f90404f;
my $seed1 = 0xc3a5c85c97cb3130;

my $hash1 = cityhash64($str);
my $hash2 = cityhash64($str, $seed0);
my $hash2 = cityhash64($str, $seed0, $seed1);

DESCRIPTION

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 hash very well.

EXPORTS

This module exports the subroutine cityhash64 on request.

SUBROUTINES

cityhash64( $data [, $seed0 [, $seed1 ] ] )

Generate the hash for the given data. The optional one or two 64-bit seeds are also hashed into the result.

ACKNOWLEDGMENTS

String::CityHash currently supports only the CityHash64 family of functions. In the next future it will also support the CityHash128 family.

AUTHOR

Alessandro Ghedini <alexbio@cpan.org>

SEE ALSO

CityHash

LICENSE AND COPYRIGHT

Copyright 2011 Alessandro Ghedini.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.