FNV-hash algorithms for Crystal Lang
Add this to your application's shard.yml
:
dependencies:
crystal_fnv:
github: pawandubey/crystal_fnv
require "crystal_fnv"
# For FNV-1
hash = CrystalFnv::Hash.fnv_1(item, size: 32)
hash_64 = CrystalFnv::Hash.fnv_1(item, size: 64)
# For FNV-1a
hash = CrystalFnv::Hash.fnv_1a(item, size: 32)
hash_64 = CrystalFnv::Hash.fnv_1a(item, size: 64)
- Fork it
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
- pawandubey Pawan Dubey - creator, maintainer