Copyright | (c) Abhinav Gupta 2015 |
---|---|
License | BSD3 |
Maintainer | Abhinav Gupta <mail@abhinavg.net> |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
FarmHash is a family of very fast hash functions. They are not suitable for cryptography.
- hash :: ByteString -> Word32
- hash32 :: ByteString -> Word32
- hash32WithSeed :: ByteString -> Word32 -> Word32
- hash64 :: ByteString -> Word64
- hash64WithSeed :: ByteString -> Word64 -> Word64
- hash64WithSeeds :: ByteString -> Word64 -> Word64 -> Word64
- fingerprint32 :: ByteString -> Word32
- fingerprint64 :: ByteString -> Word64
Hash
These functions are platform-dependent. Their output may be different on different platforms for the same string.
hash :: ByteString -> Word32 Source
Hash function for a byte array.
May change from time to time, and may differ on platforms.
hash32 :: ByteString -> Word32 Source
Hash function for a byte array. Most useful in 32-bit binaries.
May change from time to time, and may differ on platforms.
hash32WithSeed :: ByteString -> Word32 -> Word32 Source
Hash function for a byte array. For convenience, a 32-bit seed is also hashed into the result.
May change from time to time, and may differ on platforms.
hash64 :: ByteString -> Word64 Source
Hash function for a byte array.
May change from time to time, and may differ on platforms.
hash64WithSeed :: ByteString -> Word64 -> Word64 Source
Hash function for a byte array. For convenience, a 64-bit seed is also hashed into the result.
May change from time to time, and may differ on platforms.
hash64WithSeeds :: ByteString -> Word64 -> Word64 -> Word64 Source
Hash function for a byte array. For convenience, two seeds are also hashed into the result.
May change from time to time, and may differ on platforms.
Fingerprint
These functions are platform-independent. They are guaranteed to produce the same output for the same string on different platforms.
fingerprint32 :: ByteString -> Word32 Source
Fingerprint function for a byte array. Most useful in 32-bit binaries.
Portable, forever-fixed hash function.
fingerprint64 :: ByteString -> Word64 Source
Fingerprint function for a byte array.
Portable, forever-fixed hash function.