Skip to content
fnv1 and fnv1a hash functions in ruby
C Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
test
.gitignore
Gemfile
Gemfile.lock
LICENSE
README.md
Rakefile
VERSION
fnv.gemspec

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.

You can’t perform that action at this time.