crystal_fnv

FNV-1 & FNV-1a non-cryptographic hash algorithms for Crystal Lang

crystal_fnv

FNV-hash algorithms for Crystal Lang

Installation

Add this to your application's shard.yml:

dependencies:
  crystal_fnv:
    github: pawandubey/crystal_fnv

Usage

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)

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Repository

crystal_fnv

Owner
Statistic
  • 1
  • 0
  • 0
  • 1
  • 0
  • over 7 years ago
  • May 16, 2017
License

MIT License

Links
Synced at

Sat, 21 Dec 2024 16:23:57 GMT

Languages