Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Ruby Implementation of the FNV (Fowler-Noll-Vo) Non-Cryptographic Hash Algorithms

License

NotificationsYou must be signed in to change notification settings

pawandubey/fnv-hash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build StatuscodecovGem Version

Fnv::Hash

Pure Ruby implementation of theFowler-Noll-Vo Hash Algorithms

Installation

Add this line to your application's Gemfile:

gem'fnv-hash'

And then execute:

$ bundle

Or install it yourself as:

$ gem install fnv-hash

Usage

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)

Development

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.

Contributing

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.

License

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

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp