farmhash-0.1.0.5: Fast hash functions.

Copyright(c) Abhinav Gupta 2015
LicenseBSD3
MaintainerAbhinav Gupta <mail@abhinavg.net>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

FarmHash

Contents

Description

FarmHash is a family of very fast hash functions. They are not suitable for cryptography.

See https://code.google.com/p/farmhash/.

Synopsis

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.