Principled, portable & extensible hashing of data and types, including an implementation of the FNV-1a and SipHash algorithms. https://github.com/jberryman/hashabler
|Latest on Hackage:||2.0.0|
This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.
This package is a rewrite of the
hashable library by Milan Straka and
Johan Tibell, having the following goals:
Extensibility; it should be easy to implement a new hashing algorithm on any
Hashabletype; in this package we provide SipHash and FNV-1a.
Honest hashing of values, and principled hashing of algebraic data types (see e.g. hashable issues30)
Cross-platform consistent hash values, with a versioning guarantee. Where possible we ensure morally identical data hashes to indentical values regardless of processor word size and endianness.
Versioning: Except for instances where we specifically note that we make
no promise of consistency, changes to hash values (and consequently changes
StableHashable values, where applicable) entail a major version number
decodeFloatfor Float and Double, for sanity and consistency with ghcjs. Hash values for these typed have changed.
- Fix integer-gmp flag and support ghcjs (thanks to roelvandijk!)
- Performance improvements
- Implement a faster siphash-1-3
- Eq, Read, Show for SipKey
- SipKey is now a new data type with unboxed fields, instead of tuple
- export a new mixType helper for defining StableHashable instances
Hash32/64/128types by the type of their hashed source data, to enforce legitimate equality comparisons of hashes.
StableHashablefor distinguishing types with respect to their hashes across platforms and programs.
- Added a
mix64method, in use in,
HashStateand roll clarified in docs
- Implemented 64-bit and 128-bit siphash
- Instances up to 15-tuples. Now web scale!
- (initial release)