memory-0.14.8: memory and related abstraction stuff

LicenseBSD-style
MaintainerVincent Hanquez <vincent@snarc.org>
Stabilityexperimental
Portabilitygood
Safe HaskellNone
LanguageHaskell2010

Data.ByteArray.Hash

Contents

Description

provide the SipHash algorithm. reference: http://131002.net/siphash/siphash.pdf

Synopsis

SipHash

data SipKey #

SigHash Key

Constructors

SipKey !Word64 !Word64 

newtype SipHash #

Siphash tag value

Constructors

SipHash Word64 

sipHash :: ByteArrayAccess ba => SipKey -> ba -> SipHash #

Compute the SipHash tag of a byte array for a given key.

sipHash is equivalent to 'sipHashWith 2 4'

sipHashWith #

Arguments

:: ByteArrayAccess ba 
=> Int

c rounds

-> Int

d rounds

-> SipKey

key

-> ba

data to hash

-> SipHash 

Compute the SipHash tag of a byte array for a given key.

The user can choose the C and D numbers of rounds.

calling sipHash is equivalent to 'sipHashWith 2 4'

FNV1 and FNV1a (32 and 64 bits)

fnv1Hash :: ByteArrayAccess ba => ba -> FnvHash32 #

Compute the FNV1 32 bit hash value of a byte array

fnv1aHash :: ByteArrayAccess ba => ba -> FnvHash32 #

Compute the FNV1a 32 bit hash value of a byte array

fnv1_64Hash :: ByteArrayAccess ba => ba -> FnvHash64 #

Compute the FNV1 64 bit hash value of a byte array

fnv1a_64Hash :: ByteArrayAccess ba => ba -> FnvHash64 #

Compute the FNV1a 64 bit hash value of a byte array