- Notifications
You must be signed in to change notification settings - Fork0
Ruby Implementation of the FNV (Fowler-Noll-Vo) Non-Cryptographic Hash Algorithms
License
pawandubey/fnv-hash
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Pure Ruby implementation of theFowler-Noll-Vo Hash Algorithms
Add this line to your application's Gemfile:
gem'fnv-hash'
And then execute:
$ bundle
Or install it yourself as:
$ gem install fnv-hash
This gem supports geting bothfnv-1
andfnv-1a
hashes for an item. Each of these variations also supports both 32 and 64 bit versions.
# For FNV-1hash=Fnv::Hash.fnv_1(item,size:32)hash_64=Fnv::Hash.fnv_1(item,size:64)# For FNV-1ahash=Fnv::Hash.fnv_1a(item,size:32)hash_64=Fnv::Hash.fnv_1a(item,size:64)
After checking out the repo, runbin/setup
to install dependencies. Then, runrake test
to run the tests. You can also runbin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, runbundle exec rake install
. To release a new version, update the version number inversion.rb
, and then runbundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the.gem
file torubygems.org.
Bug reports and pull requests are welcome on GitHub athttps://github.com/pawandubey/fnv-hash. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to theContributor Covenant code of conduct.
Copyright 2017 Pawan Dubey
Licensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.
About
Ruby Implementation of the FNV (Fowler-Noll-Vo) Non-Cryptographic Hash Algorithms