fnv1 and fnv1a hash functions in ruby
C Ruby
Latest commit 892fc9b Jul 17, 2011 @jakedouglas remove c file
Permalink
Failed to load latest commit information.
lib multiply mod 2**N instead of masking. way faster Jul 16, 2011
test jeweler stuff Jul 16, 2011
.gitignore gitignore Jul 16, 2011
Gemfile jeweler stuff Jul 16, 2011
Gemfile.lock jeweler stuff Jul 16, 2011
LICENSE jeweler stuff Jul 16, 2011
README.md mention java version Jul 17, 2011
Rakefile jeweler stuff Jul 16, 2011
VERSION Version bump to 0.2.0 Jul 16, 2011
fnv.gemspec Regenerate gemspec for version 0.2.0 Jul 16, 2011

README.md

Fowler-Noll-Vo hash

gem install fnv

require "fnv"

FNV.new.fnv1a_64("blah") => 14233852691173593346

Supported hashes are fnv1_32, fnv1_64, fnv1a_32, and fnv1a_64.

There are other implementations for ruby but they use C.

Test cases were taken from here.

There is also a Java version.