cuckoo-0.3.1: Haskell Implementation of Cuckoo Filters
CopyrightCopyright © 2021 Lars Kuhtz <lakuhtz@gmail.com>
LicenseBSD3
MaintainerLars Kuhtz <lakuhtz@gmail.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Data.Cuckoo.Internal.HashFunctions

Description

 
Synopsis

Salted Hash Functions

saltedFnv1aPtr Source #

Arguments

:: Int

Salt

-> Ptr Word8

Bytes that are hashed

-> Int

Number of bytes

-> IO Word64 

Computes a 64 bit Fnv1a hash for a value that is an instance of ByteArrayAccess.

The first argument is use as a salt.

saltedFnv1aStorable Source #

Arguments

:: Storable a 
=> Int

Salt

-> a

Value that is hashed

-> Word64 

Computes a 64 bit Fnv1a hash for a value that has an Storable instance.

The first argument is use as a salt.

saltedFnv1aByteString Source #

Arguments

:: Int

Salt

-> ByteString

Bytes that are hashed

-> Word64 

Salted Sip Hash

saltedSipHashPtr Source #

Arguments

:: Int

Salt

-> Ptr Word8

Bytes that is hashed

-> Int

Number of bytes

-> IO Word64 

Computes a Sip hash for a value that is represented as byte pointer.

The first argument is a salt value that is used to derive the key for the hash computation.

saltedSipHashStorable Source #

Arguments

:: Storable a 
=> Int

Salt

-> a

Value that is hashed

-> Word64 

Computes a Sip hash for a value that has an Storable instance.

The first argument is a salt value that is used to derive the key for the hash computation.

saltedSipHashByteString Source #

Arguments

:: Int

Salt

-> ByteString

Value that is hashed

-> Word64 

Computes a Sip hash for a value that has an Storable instance.

The first argument is a salt value that is used to derive the key for the hash computation.

Internal Use Only

sipHashInternal :: Storable a => Int -> a -> Word64 Source #

An version of a Sip hash that is used only internally. In order to avoid dependencies between different hash computations, it shouldn't be used in the implementation of instances of CuckooFilterHash.