License | BSD-style |
---|---|
Maintainer | Foundation |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Documentation
class Hashable a where Source #
Type with the ability to be hashed
Hashable doesn't have any specific rules, and it's made for raw speed. More specifically don't expect different type representing the same data to hash to the same value
hashMix (1 :: Integer) /= hashMix (1 :: Word8)
True
Instances
Incremental Hashing state. Represent an hashing algorithm
the base primitive of this class is hashMix8
, append
mix a Word8 in the state
The class allow to define faster mixing function that works on bigger Word size and any unboxed array of any PrimType elements
hashNew, hashNewParam, hashMix8, hashEnd
Instances
Specific methods
FNV1 32 bit state
Instances
Hasher FNV1_32 Source # | |
Defined in Foundation.Hashing.FNV hashNewParam :: HashInitParam FNV1_32 -> FNV1_32 hashEnd :: FNV1_32 -> HashResult FNV1_32 hashMix8 :: Word8 -> FNV1_32 -> FNV1_32 hashMix16 :: Word16 -> FNV1_32 -> FNV1_32 hashMix32 :: Word32 -> FNV1_32 -> FNV1_32 hashMix64 :: Word64 -> FNV1_32 -> FNV1_32 hashMixBytes :: PrimType e => UArray e -> FNV1_32 -> FNV1_32 |
FNV1 64 bit state
Instances
Hasher FNV1_64 Source # | |
Defined in Foundation.Hashing.FNV hashNewParam :: HashInitParam FNV1_64 -> FNV1_64 hashEnd :: FNV1_64 -> HashResult FNV1_64 hashMix8 :: Word8 -> FNV1_64 -> FNV1_64 hashMix16 :: Word16 -> FNV1_64 -> FNV1_64 hashMix32 :: Word32 -> FNV1_64 -> FNV1_64 hashMix64 :: Word64 -> FNV1_64 -> FNV1_64 hashMixBytes :: PrimType e => UArray e -> FNV1_64 -> FNV1_64 |
FNV1a 32 bit state
Instances
Hasher FNV1a_32 Source # | |
Defined in Foundation.Hashing.FNV hashNewParam :: HashInitParam FNV1a_32 -> FNV1a_32 hashEnd :: FNV1a_32 -> HashResult FNV1a_32 hashMix8 :: Word8 -> FNV1a_32 -> FNV1a_32 hashMix16 :: Word16 -> FNV1a_32 -> FNV1a_32 hashMix32 :: Word32 -> FNV1a_32 -> FNV1a_32 hashMix64 :: Word64 -> FNV1a_32 -> FNV1a_32 hashMixBytes :: PrimType e => UArray e -> FNV1a_32 -> FNV1a_32 |
FNV1a 64 bit state
Instances
Hasher FNV1a_64 Source # | |
Defined in Foundation.Hashing.FNV hashNewParam :: HashInitParam FNV1a_64 -> FNV1a_64 hashEnd :: FNV1a_64 -> HashResult FNV1a_64 hashMix8 :: Word8 -> FNV1a_64 -> FNV1a_64 hashMix16 :: Word16 -> FNV1a_64 -> FNV1a_64 hashMix32 :: Word32 -> FNV1a_64 -> FNV1a_64 hashMix64 :: Word64 -> FNV1a_64 -> FNV1a_64 hashMixBytes :: PrimType e => UArray e -> FNV1a_64 -> FNV1a_64 |
Sip State 1-3 (1 compression rounds, 3 digest rounds)
Instances
Hasher Sip1_3 Source # | |
Defined in Foundation.Hashing.SipHash |
Sip State 2-4 (2 compression rounds, 4 digest rounds)
Instances
Hasher Sip2_4 Source # | |
Defined in Foundation.Hashing.SipHash |