Copyright | Copyright © 2021 Lars Kuhtz <[email protected]> |
---|---|
License | BSD3 |
Maintainer | Lars Kuhtz <[email protected]> |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Data.Cuckoo.Internal.HashFunctions
Description
Synopsis
- saltedFnv1aPtr :: Int -> Ptr Word8 -> Int -> IO Word64
- saltedFnv1aStorable :: Storable a => Int -> a -> Word64
- saltedFnv1aByteString :: Int -> ByteString -> Word64
- saltedSipHashPtr :: Int -> Ptr Word8 -> Int -> IO Word64
- saltedSipHashStorable :: Storable a => Int -> a -> Word64
- saltedSipHashByteString :: Int -> ByteString -> Word64
- sipHashInternal :: Storable a => Int -> a -> Word64
Salted Hash Functions
Computes a 64 bit Fnv1a hash for a value that is an instance of
ByteArrayAccess
.
The first argument is use as a salt.
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
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 #
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
.