murmur-hash-0.1.0.8: MurmurHash2 implementation for Haskell.

Copyright(c) Thomas Schilling 2010
LicenseBSD-style
Maintainernominolo@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell98

Data.Digest.Murmur32

Description

Type class and primitives for constructing 32 bit hashes using the MurmurHash2 algorithm. See http://murmurhash.googlepages.com for details on MurmurHash2.

Synopsis

Documentation

data Hash32 Source

A 32 bit hash.

asWord32 :: Hash32 -> Word32 Source

Extract 32 bit word from hash.

hash32 :: Hashable32 a => a -> Hash32 Source

Create a hash using the default seed.

hash32WithSeed :: Hashable32 a => Word32 -> a -> Hash32 Source

Create a hash using a custom seed.

The seed should be non-zero, but other than that can be an arbitrary number. Different seeds will give different hashes, and thus (most likely) different hash collisions.