-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Hash functions
--
-- Efficient implementations of hash functions
@package hashes
@version 0.2.2.1
-- | Incremental Mutable Hashes
module Data.Hash.Class.Mutable.Internal
class IncrementalHash a where {
type Context a :: Type;
}
update :: IncrementalHash a => Context a -> Ptr Word8 -> Int -> IO ()
finalize :: IncrementalHash a => Context a -> IO a
updateByteString :: forall a. IncrementalHash a => Context a -> ByteString -> IO ()
updateByteStringLazy :: forall a. IncrementalHash a => Context a -> ByteString -> IO ()
updateShortByteString :: forall a. IncrementalHash a => Context a -> ShortByteString -> IO ()
updateStorable :: forall a b. IncrementalHash a => Storable b => Context a -> b -> IO ()
updateByteArray :: forall a. IncrementalHash a => Context a -> ByteArray# -> IO ()
-- | Class of Salted Pure Hashes
module Data.Hash.Class.Mutable
class IncrementalHash a => Hash a
initialize :: Hash a => IO (Context a)
class IncrementalHash a where {
type Context a :: Type;
}
update :: IncrementalHash a => Context a -> Ptr Word8 -> Int -> IO ()
finalize :: IncrementalHash a => Context a -> IO a
hashPtr :: forall a. Hash a => Ptr Word8 -> Int -> IO a
hashStorable :: forall a b. Hash a => Storable b => b -> IO a
hashByteString :: forall a. Hash a => ByteString -> a
hashByteStringLazy :: forall a. Hash a => ByteString -> a
hashShortByteString :: forall a. Hash a => ShortByteString -> IO a
hashByteArray :: forall a. Hash a => ByteArray# -> IO a
updateByteString :: forall a. IncrementalHash a => Context a -> ByteString -> IO ()
updateByteStringLazy :: forall a. IncrementalHash a => Context a -> ByteString -> IO ()
updateShortByteString :: forall a. IncrementalHash a => Context a -> ShortByteString -> IO ()
updateStorable :: forall a b. IncrementalHash a => Storable b => Context a -> b -> IO ()
updateByteArray :: forall a. IncrementalHash a => Context a -> ByteArray# -> IO ()
-- | Class of Salted Mutable Hashes
module Data.Hash.Class.Mutable.Salted
class IncrementalHash a => Hash a where {
type Salt a :: Type;
}
initialize :: Hash a => Salt a -> IO (Context a)
hashPtr :: forall a. Hash a => Salt a -> Ptr Word8 -> Int -> IO a
hashStorable :: forall a b. Hash a => Storable b => Salt a -> b -> IO a
hashByteString :: forall a. Hash a => Salt a -> ByteString -> a
hashByteStringLazy :: forall a. Hash a => Salt a -> ByteString -> a
hashShortByteString :: forall a. Hash a => Salt a -> ShortByteString -> IO a
hashByteArray :: forall a. Hash a => Salt a -> ByteArray# -> IO a
updateByteString :: forall a. IncrementalHash a => Context a -> ByteString -> IO ()
updateByteStringLazy :: forall a. IncrementalHash a => Context a -> ByteString -> IO ()
updateShortByteString :: forall a. IncrementalHash a => Context a -> ShortByteString -> IO ()
updateStorable :: forall a b. IncrementalHash a => Storable b => Context a -> b -> IO ()
updateByteArray :: forall a. IncrementalHash a => Context a -> ByteArray# -> IO ()
-- | Incremental Pure Hashes
module Data.Hash.Class.Pure.Internal
class IncrementalHash a where {
type Context a :: Type;
}
update :: IncrementalHash a => Context a -> Ptr Word8 -> Int -> IO (Context a)
finalize :: IncrementalHash a => Context a -> a
updateByteString :: forall a. IncrementalHash a => Context a -> ByteString -> Context a
updateByteStringLazy :: forall a. IncrementalHash a => Context a -> ByteString -> Context a
updateShortByteString :: forall a. IncrementalHash a => Context a -> ShortByteString -> Context a
updateStorable :: forall a b. IncrementalHash a => Storable b => Context a -> b -> Context a
updateByteArray :: forall a. IncrementalHash a => Context a -> ByteArray# -> Context a
-- | Hashes with pure context
module Data.Hash.Class.Pure
class IncrementalHash a => Hash a
initialize :: Hash a => Context a
class IncrementalHash a where {
type Context a :: Type;
}
update :: IncrementalHash a => Context a -> Ptr Word8 -> Int -> IO (Context a)
finalize :: IncrementalHash a => Context a -> a
hashPtr :: forall a. Hash a => Ptr Word8 -> Int -> IO a
hashStorable :: forall a b. Hash a => Storable b => b -> a
hashByteString :: forall a. Hash a => ByteString -> a
hashByteStringLazy :: forall a. Hash a => ByteString -> a
hashShortByteString :: forall a. Hash a => ShortByteString -> a
hashByteArray :: forall a. Hash a => ByteArray# -> a
updateByteString :: forall a. IncrementalHash a => Context a -> ByteString -> Context a
updateByteStringLazy :: forall a. IncrementalHash a => Context a -> ByteString -> Context a
updateShortByteString :: forall a. IncrementalHash a => Context a -> ShortByteString -> Context a
updateStorable :: forall a b. IncrementalHash a => Storable b => Context a -> b -> Context a
updateByteArray :: forall a. IncrementalHash a => Context a -> ByteArray# -> Context a
-- | Utility function to initialize a hash with a salt
initializeWithSalt :: forall a s. Hash a => Storable s => s -> Context a
module Data.Hash.Class.Pure.Salted
class IncrementalHash a => Hash a where {
type Salt a :: Type;
}
initialize :: Hash a => Salt a -> Context a
class IncrementalHash a where {
type Context a :: Type;
}
update :: IncrementalHash a => Context a -> Ptr Word8 -> Int -> IO (Context a)
finalize :: IncrementalHash a => Context a -> a
hashPtr :: forall a. Hash a => Salt a -> Ptr Word8 -> Int -> IO a
hashStorable :: forall a b. Hash a => Storable b => Salt a -> b -> a
hashByteString :: forall a. Hash a => Salt a -> ByteString -> a
hashByteStringLazy :: forall a. Hash a => Salt a -> ByteString -> a
hashShortByteString :: forall a. Hash a => Salt a -> ShortByteString -> a
hashByteArray :: forall a. Hash a => Salt a -> ByteArray# -> a
updateByteString :: forall a. IncrementalHash a => Context a -> ByteString -> Context a
updateByteStringLazy :: forall a. IncrementalHash a => Context a -> ByteString -> Context a
updateShortByteString :: forall a. IncrementalHash a => Context a -> ShortByteString -> Context a
updateStorable :: forall a b. IncrementalHash a => Storable b => Context a -> b -> Context a
updateByteArray :: forall a. IncrementalHash a => Context a -> ByteArray# -> Context a
-- | The primitive versions are usually not more efficient than the version
-- with explicit word sizes for the respective host architecture.
module Data.Hash.FNV1
newtype Fnv164Hash
Fnv164Hash :: Word64 -> Fnv164Hash
data Fnv164Context
fnv164Initialize :: Fnv164Context
fnv164Update :: Fnv164Context -> Ptr Word8 -> Int -> IO Fnv164Context
fnv164Finalize :: Fnv164Context -> Fnv164Hash
fnv164 :: Ptr Word8 -> Int -> IO Fnv164Hash
newtype Fnv1a64Hash
Fnv1a64Hash :: Word64 -> Fnv1a64Hash
data Fnv1a64Context
fnv1a64Initialize :: Fnv1a64Context
fnv1a64Update :: Fnv1a64Context -> Ptr Word8 -> Int -> IO Fnv1a64Context
fnv1a64Finalize :: Fnv1a64Context -> Fnv1a64Hash
fnv1a64 :: Ptr Word8 -> Int -> IO Fnv1a64Hash
newtype Fnv132Hash
Fnv132Hash :: Word32 -> Fnv132Hash
data Fnv132Context
fnv132Initialize :: Fnv132Context
fnv132Update :: Fnv132Context -> Ptr Word8 -> Int -> IO Fnv132Context
fnv132Finalize :: Fnv132Context -> Fnv132Hash
fnv132 :: Ptr Word8 -> Int -> IO Fnv132Hash
newtype Fnv1a32Hash
Fnv1a32Hash :: Word32 -> Fnv1a32Hash
data Fnv1a32Context
fnv1a32Initialize :: Fnv1a32Context
fnv1a32Update :: Fnv1a32Context -> Ptr Word8 -> Int -> IO Fnv1a32Context
fnv1a32Finalize :: Fnv1a32Context -> Fnv1a32Hash
fnv1a32 :: Ptr Word8 -> Int -> IO Fnv1a32Hash
newtype Fnv1Hash
Fnv1Hash :: Word -> Fnv1Hash
data Fnv1Context
fnv1Initialize :: Fnv1Context
fnv1Update :: Fnv1Context -> Ptr Word8 -> Int -> IO Fnv1Context
fnv1Finalize :: Fnv1Context -> Fnv1Hash
fnv1 :: Ptr Word8 -> Int -> IO Fnv1Hash
newtype Fnv1aHash
Fnv1aHash :: Word -> Fnv1aHash
data Fnv1aContext
fnv1aInitialize :: Fnv1aContext
fnv1aUpdate :: Fnv1aContext -> Ptr Word8 -> Int -> IO Fnv1aContext
fnv1aFinalize :: Fnv1aContext -> Fnv1aHash
fnv1a :: Ptr Word8 -> Int -> IO Fnv1aHash
fnv1_64 :: Ptr Word8 -> Int -> IO Word64
fnv1_64_ :: Ptr Word8 -> Int -> Word64 -> IO Word64
fnv1a_64 :: Ptr Word8 -> Int -> IO Word64
fnv1a_64_ :: Ptr Word8 -> Int -> Word64 -> IO Word64
fnv1_32 :: Ptr Word8 -> Int -> IO Word32
fnv1_32_ :: Ptr Word8 -> Int -> Word32 -> IO Word32
fnv1a_32 :: Ptr Word8 -> Int -> IO Word32
fnv1a_32_ :: Ptr Word8 -> Int -> Word32 -> IO Word32
fnv1_host :: Ptr Word8 -> Int -> IO Word
fnv1_host_ :: Ptr Word8 -> Int -> Word -> IO Word
fnv1Primitive :: Addr# -> Int# -> State# tok -> (# State# tok, Word# #)
fnv1Primitive_ :: Addr# -> Int# -> Word# -> State# tok -> (# State# tok, Word# #)
fnv1a_host :: Ptr Word8 -> Int -> IO Word
fnv1a_host_ :: Ptr Word8 -> Int -> Word -> IO Word
fnv1aPrimitive :: Addr# -> Int# -> State# tok -> (# State# tok, Word# #)
fnv1aPrimitive_ :: Addr# -> Int# -> Word# -> State# tok -> (# State# tok, Word# #)
fnvPrime :: Word
fnvPrime32 :: Word32
fnvPrime64 :: Word64
fnvOffsetBasis :: Word
fnvOffsetBasis32 :: Word32
fnvOffsetBasis64 :: Word64
instance GHC.Classes.Ord Data.Hash.FNV1.Fnv164Hash
instance GHC.Classes.Eq Data.Hash.FNV1.Fnv164Hash
instance GHC.Show.Show Data.Hash.FNV1.Fnv164Hash
instance GHC.Classes.Ord Data.Hash.FNV1.Fnv1a64Hash
instance GHC.Classes.Eq Data.Hash.FNV1.Fnv1a64Hash
instance GHC.Show.Show Data.Hash.FNV1.Fnv1a64Hash
instance GHC.Classes.Ord Data.Hash.FNV1.Fnv132Hash
instance GHC.Classes.Eq Data.Hash.FNV1.Fnv132Hash
instance GHC.Show.Show Data.Hash.FNV1.Fnv132Hash
instance GHC.Classes.Ord Data.Hash.FNV1.Fnv1a32Hash
instance GHC.Classes.Eq Data.Hash.FNV1.Fnv1a32Hash
instance GHC.Show.Show Data.Hash.FNV1.Fnv1a32Hash
instance GHC.Classes.Ord Data.Hash.FNV1.Fnv1Hash
instance GHC.Classes.Eq Data.Hash.FNV1.Fnv1Hash
instance GHC.Show.Show Data.Hash.FNV1.Fnv1Hash
instance GHC.Classes.Ord Data.Hash.FNV1.Fnv1aHash
instance GHC.Classes.Eq Data.Hash.FNV1.Fnv1aHash
instance GHC.Show.Show Data.Hash.FNV1.Fnv1aHash
instance Data.Hash.Class.Pure.Internal.IncrementalHash Data.Hash.FNV1.Fnv1aHash
instance Data.Hash.Class.Pure.Hash Data.Hash.FNV1.Fnv1aHash
instance Data.Hash.Class.Pure.Internal.IncrementalHash Data.Hash.FNV1.Fnv1Hash
instance Data.Hash.Class.Pure.Hash Data.Hash.FNV1.Fnv1Hash
instance Data.Hash.Class.Pure.Internal.IncrementalHash Data.Hash.FNV1.Fnv1a32Hash
instance Data.Hash.Class.Pure.Hash Data.Hash.FNV1.Fnv1a32Hash
instance Data.Hash.Class.Pure.Internal.IncrementalHash Data.Hash.FNV1.Fnv132Hash
instance Data.Hash.Class.Pure.Hash Data.Hash.FNV1.Fnv132Hash
instance Data.Hash.Class.Pure.Internal.IncrementalHash Data.Hash.FNV1.Fnv1a64Hash
instance Data.Hash.Class.Pure.Hash Data.Hash.FNV1.Fnv1a64Hash
instance Data.Hash.Class.Pure.Internal.IncrementalHash Data.Hash.FNV1.Fnv164Hash
instance Data.Hash.Class.Pure.Hash Data.Hash.FNV1.Fnv164Hash
-- | Salted variants for FNV1 Hashes
module Data.Hash.FNV1.Salted
newtype Fnv164Hash
Fnv164Hash :: Word64 -> Fnv164Hash
data Fnv164Context
newtype Fnv1a64Hash
Fnv1a64Hash :: Word64 -> Fnv1a64Hash
data Fnv1a64Context
newtype Fnv132Hash
Fnv132Hash :: Word32 -> Fnv132Hash
data Fnv132Context
newtype Fnv1a32Hash
Fnv1a32Hash :: Word32 -> Fnv1a32Hash
data Fnv1a32Context
newtype Fnv1Hash
Fnv1Hash :: Word -> Fnv1Hash
data Fnv1Context
newtype Fnv1aHash
Fnv1aHash :: Word -> Fnv1aHash
data Fnv1aContext
instance Data.Hash.Class.Pure.Salted.Hash Data.Hash.FNV1.Fnv164Hash
instance Data.Hash.Class.Pure.Salted.Hash Data.Hash.FNV1.Fnv1a64Hash
instance Data.Hash.Class.Pure.Salted.Hash Data.Hash.FNV1.Fnv132Hash
instance Data.Hash.Class.Pure.Salted.Hash Data.Hash.FNV1.Fnv1a32Hash
instance Data.Hash.Class.Pure.Salted.Hash Data.Hash.FNV1.Fnv1Hash
instance Data.Hash.Class.Pure.Salted.Hash Data.Hash.FNV1.Fnv1aHash
module Data.Hash.Internal.Utils
newtype B16ShortByteString
B16ShortByteString :: ShortByteString -> B16ShortByteString
instance GHC.Show.Show Data.Hash.Internal.Utils.B16ShortByteString
-- | Bindings for OpenSSL EVP Message Digest Routines
module Data.Hash.Internal.OpenSSL
newtype Algorithm
Algorithm :: Ptr Void -> Algorithm
newtype Ctx a
Ctx :: ForeignPtr Void -> Ctx a
newtype Digest a
Digest :: ShortByteString -> Digest a
newCtx :: IO (Ctx a)
initCtx :: Algorithm -> IO (Ctx a)
updateCtx :: Ctx a -> Ptr Word8 -> Int -> IO ()
finalCtx :: Ctx a -> IO (Digest a)
class OpenSslDigest a
algorithm :: OpenSslDigest a => Algorithm
newtype OpenSslException
OpenSslException :: String -> OpenSslException
newtype Sha2_224
Sha2_224 :: ShortByteString -> Sha2_224
newtype Sha2_256
Sha2_256 :: ShortByteString -> Sha2_256
newtype Sha2_384
Sha2_384 :: ShortByteString -> Sha2_384
newtype Sha2_512
Sha2_512 :: ShortByteString -> Sha2_512
newtype Sha2_512_224
Sha2_512_224 :: ShortByteString -> Sha2_512_224
newtype Sha2_512_256
Sha2_512_256 :: ShortByteString -> Sha2_512_256
newtype Sha3_224
Sha3_224 :: ShortByteString -> Sha3_224
newtype Sha3_256
Sha3_256 :: ShortByteString -> Sha3_256
newtype Sha3_384
Sha3_384 :: ShortByteString -> Sha3_384
newtype Sha3_512
Sha3_512 :: ShortByteString -> Sha3_512
newtype Shake128
Shake128 :: ShortByteString -> Shake128
newtype Shake256
Shake256 :: ShortByteString -> Shake256
newtype Keccak256
Keccak256 :: ShortByteString -> Keccak256
newtype Keccak512
Keccak512 :: ShortByteString -> Keccak512
newtype Blake2b512
Blake2b512 :: ShortByteString -> Blake2b512
newtype Blake2s256
Blake2s256 :: ShortByteString -> Blake2s256
instance GHC.Show.Show Data.Hash.Internal.OpenSSL.OpenSslException
instance GHC.Show.Show (Data.Hash.Internal.OpenSSL.Digest a)
instance GHC.Classes.Ord (Data.Hash.Internal.OpenSSL.Digest a)
instance GHC.Classes.Eq (Data.Hash.Internal.OpenSSL.Digest a)
instance Data.Hash.Class.Mutable.Hash Data.Hash.Internal.OpenSSL.Sha2_224
instance Data.Hash.Class.Mutable.Internal.IncrementalHash Data.Hash.Internal.OpenSSL.Sha2_224
instance GHC.Show.Show Data.Hash.Internal.OpenSSL.Sha2_224
instance GHC.Classes.Ord Data.Hash.Internal.OpenSSL.Sha2_224
instance GHC.Classes.Eq Data.Hash.Internal.OpenSSL.Sha2_224
instance Data.Hash.Class.Mutable.Hash Data.Hash.Internal.OpenSSL.Sha2_256
instance Data.Hash.Class.Mutable.Internal.IncrementalHash Data.Hash.Internal.OpenSSL.Sha2_256
instance GHC.Show.Show Data.Hash.Internal.OpenSSL.Sha2_256
instance GHC.Classes.Ord Data.Hash.Internal.OpenSSL.Sha2_256
instance GHC.Classes.Eq Data.Hash.Internal.OpenSSL.Sha2_256
instance Data.Hash.Class.Mutable.Hash Data.Hash.Internal.OpenSSL.Sha2_384
instance Data.Hash.Class.Mutable.Internal.IncrementalHash Data.Hash.Internal.OpenSSL.Sha2_384
instance GHC.Show.Show Data.Hash.Internal.OpenSSL.Sha2_384
instance GHC.Classes.Ord Data.Hash.Internal.OpenSSL.Sha2_384
instance GHC.Classes.Eq Data.Hash.Internal.OpenSSL.Sha2_384
instance Data.Hash.Class.Mutable.Hash Data.Hash.Internal.OpenSSL.Sha2_512
instance Data.Hash.Class.Mutable.Internal.IncrementalHash Data.Hash.Internal.OpenSSL.Sha2_512
instance GHC.Show.Show Data.Hash.Internal.OpenSSL.Sha2_512
instance GHC.Classes.Ord Data.Hash.Internal.OpenSSL.Sha2_512
instance GHC.Classes.Eq Data.Hash.Internal.OpenSSL.Sha2_512
instance Data.Hash.Class.Mutable.Hash Data.Hash.Internal.OpenSSL.Sha2_512_224
instance Data.Hash.Class.Mutable.Internal.IncrementalHash Data.Hash.Internal.OpenSSL.Sha2_512_224
instance GHC.Show.Show Data.Hash.Internal.OpenSSL.Sha2_512_224
instance GHC.Classes.Ord Data.Hash.Internal.OpenSSL.Sha2_512_224
instance GHC.Classes.Eq Data.Hash.Internal.OpenSSL.Sha2_512_224
instance Data.Hash.Class.Mutable.Hash Data.Hash.Internal.OpenSSL.Sha2_512_256
instance Data.Hash.Class.Mutable.Internal.IncrementalHash Data.Hash.Internal.OpenSSL.Sha2_512_256
instance GHC.Show.Show Data.Hash.Internal.OpenSSL.Sha2_512_256
instance GHC.Classes.Ord Data.Hash.Internal.OpenSSL.Sha2_512_256
instance GHC.Classes.Eq Data.Hash.Internal.OpenSSL.Sha2_512_256
instance Data.Hash.Class.Mutable.Hash Data.Hash.Internal.OpenSSL.Sha3_224
instance Data.Hash.Class.Mutable.Internal.IncrementalHash Data.Hash.Internal.OpenSSL.Sha3_224
instance GHC.Show.Show Data.Hash.Internal.OpenSSL.Sha3_224
instance GHC.Classes.Ord Data.Hash.Internal.OpenSSL.Sha3_224
instance GHC.Classes.Eq Data.Hash.Internal.OpenSSL.Sha3_224
instance Data.Hash.Class.Mutable.Hash Data.Hash.Internal.OpenSSL.Sha3_256
instance Data.Hash.Class.Mutable.Internal.IncrementalHash Data.Hash.Internal.OpenSSL.Sha3_256
instance GHC.Show.Show Data.Hash.Internal.OpenSSL.Sha3_256
instance GHC.Classes.Ord Data.Hash.Internal.OpenSSL.Sha3_256
instance GHC.Classes.Eq Data.Hash.Internal.OpenSSL.Sha3_256
instance Data.Hash.Class.Mutable.Hash Data.Hash.Internal.OpenSSL.Sha3_384
instance Data.Hash.Class.Mutable.Internal.IncrementalHash Data.Hash.Internal.OpenSSL.Sha3_384
instance GHC.Show.Show Data.Hash.Internal.OpenSSL.Sha3_384
instance GHC.Classes.Ord Data.Hash.Internal.OpenSSL.Sha3_384
instance GHC.Classes.Eq Data.Hash.Internal.OpenSSL.Sha3_384
instance Data.Hash.Class.Mutable.Hash Data.Hash.Internal.OpenSSL.Sha3_512
instance Data.Hash.Class.Mutable.Internal.IncrementalHash Data.Hash.Internal.OpenSSL.Sha3_512
instance GHC.Show.Show Data.Hash.Internal.OpenSSL.Sha3_512
instance GHC.Classes.Ord Data.Hash.Internal.OpenSSL.Sha3_512
instance GHC.Classes.Eq Data.Hash.Internal.OpenSSL.Sha3_512
instance Data.Hash.Class.Mutable.Hash Data.Hash.Internal.OpenSSL.Shake128
instance Data.Hash.Class.Mutable.Internal.IncrementalHash Data.Hash.Internal.OpenSSL.Shake128
instance GHC.Show.Show Data.Hash.Internal.OpenSSL.Shake128
instance GHC.Classes.Ord Data.Hash.Internal.OpenSSL.Shake128
instance GHC.Classes.Eq Data.Hash.Internal.OpenSSL.Shake128
instance Data.Hash.Class.Mutable.Hash Data.Hash.Internal.OpenSSL.Shake256
instance Data.Hash.Class.Mutable.Internal.IncrementalHash Data.Hash.Internal.OpenSSL.Shake256
instance GHC.Show.Show Data.Hash.Internal.OpenSSL.Shake256
instance GHC.Classes.Ord Data.Hash.Internal.OpenSSL.Shake256
instance GHC.Classes.Eq Data.Hash.Internal.OpenSSL.Shake256
instance GHC.Show.Show Data.Hash.Internal.OpenSSL.Keccak256
instance GHC.Classes.Ord Data.Hash.Internal.OpenSSL.Keccak256
instance GHC.Classes.Eq Data.Hash.Internal.OpenSSL.Keccak256
instance GHC.Show.Show Data.Hash.Internal.OpenSSL.Keccak512
instance GHC.Classes.Ord Data.Hash.Internal.OpenSSL.Keccak512
instance GHC.Classes.Eq Data.Hash.Internal.OpenSSL.Keccak512
instance Data.Hash.Class.Mutable.Hash Data.Hash.Internal.OpenSSL.Blake2b512
instance Data.Hash.Class.Mutable.Internal.IncrementalHash Data.Hash.Internal.OpenSSL.Blake2b512
instance GHC.Show.Show Data.Hash.Internal.OpenSSL.Blake2b512
instance GHC.Classes.Ord Data.Hash.Internal.OpenSSL.Blake2b512
instance GHC.Classes.Eq Data.Hash.Internal.OpenSSL.Blake2b512
instance Data.Hash.Class.Mutable.Hash Data.Hash.Internal.OpenSSL.Blake2s256
instance Data.Hash.Class.Mutable.Internal.IncrementalHash Data.Hash.Internal.OpenSSL.Blake2s256
instance GHC.Show.Show Data.Hash.Internal.OpenSSL.Blake2s256
instance GHC.Classes.Ord Data.Hash.Internal.OpenSSL.Blake2s256
instance GHC.Classes.Eq Data.Hash.Internal.OpenSSL.Blake2s256
instance Data.Hash.Internal.OpenSSL.OpenSslDigest Data.Hash.Internal.OpenSSL.Blake2s256
instance Data.Hash.Internal.OpenSSL.OpenSslDigest Data.Hash.Internal.OpenSSL.Blake2b512
instance Data.Hash.Class.Mutable.Internal.IncrementalHash Data.Hash.Internal.OpenSSL.Keccak512
instance Data.Hash.Class.Mutable.Hash Data.Hash.Internal.OpenSSL.Keccak512
instance Data.Hash.Class.Mutable.Internal.IncrementalHash Data.Hash.Internal.OpenSSL.Keccak256
instance Data.Hash.Class.Mutable.Hash Data.Hash.Internal.OpenSSL.Keccak256
instance Data.Hash.Internal.OpenSSL.OpenSslDigest Data.Hash.Internal.OpenSSL.Shake256
instance Data.Hash.Internal.OpenSSL.OpenSslDigest Data.Hash.Internal.OpenSSL.Shake128
instance Data.Hash.Internal.OpenSSL.OpenSslDigest Data.Hash.Internal.OpenSSL.Sha3_512
instance Data.Hash.Internal.OpenSSL.OpenSslDigest Data.Hash.Internal.OpenSSL.Sha3_384
instance Data.Hash.Internal.OpenSSL.OpenSslDigest Data.Hash.Internal.OpenSSL.Sha3_256
instance Data.Hash.Internal.OpenSSL.OpenSslDigest Data.Hash.Internal.OpenSSL.Sha3_224
instance Data.Hash.Internal.OpenSSL.OpenSslDigest Data.Hash.Internal.OpenSSL.Sha2_512_256
instance Data.Hash.Internal.OpenSSL.OpenSslDigest Data.Hash.Internal.OpenSSL.Sha2_512_224
instance Data.Hash.Internal.OpenSSL.OpenSslDigest Data.Hash.Internal.OpenSSL.Sha2_512
instance Data.Hash.Internal.OpenSSL.OpenSslDigest Data.Hash.Internal.OpenSSL.Sha2_384
instance Data.Hash.Internal.OpenSSL.OpenSslDigest Data.Hash.Internal.OpenSSL.Sha2_256
instance Data.Hash.Internal.OpenSSL.OpenSslDigest Data.Hash.Internal.OpenSSL.Sha2_224
instance Data.Hash.Internal.OpenSSL.OpenSslDigest a => Data.Hash.Class.Mutable.Internal.IncrementalHash (Data.Hash.Internal.OpenSSL.Digest a)
instance Data.Hash.Internal.OpenSSL.OpenSslDigest a => Data.Hash.Class.Mutable.Hash (Data.Hash.Internal.OpenSSL.Digest a)
instance GHC.Exception.Type.Exception Data.Hash.Internal.OpenSSL.OpenSslException
-- | Blake2 Hash Functions
module Data.Hash.Blake2
newtype Blake2b512
Blake2b512 :: ShortByteString -> Blake2b512
newtype Blake2s256
Blake2s256 :: ShortByteString -> Blake2s256
-- | | The code in this module uses internal OpenSSL APIs. It may break
-- with new versions of OpenSSL. It may also be broken for existing
-- versions of OpenSSL. Portability of the code is unknown.
--
-- ONLY USE THIS CODE AFTER YOU HAVE VERIFIED THAT IT WORKS WITH OUR
-- VERSION OF OPENSSL.
--
-- For details see the file cbits/keccak.c.
module Data.Hash.Keccak
newtype Keccak256
Keccak256 :: ShortByteString -> Keccak256
newtype Keccak512
Keccak512 :: ShortByteString -> Keccak512
-- | SHA-2 Hash Functions
module Data.Hash.SHA2
newtype Sha2_224
Sha2_224 :: ShortByteString -> Sha2_224
newtype Sha2_256
Sha2_256 :: ShortByteString -> Sha2_256
newtype Sha2_384
Sha2_384 :: ShortByteString -> Sha2_384
newtype Sha2_512
Sha2_512 :: ShortByteString -> Sha2_512
newtype Sha2_512_224
Sha2_512_224 :: ShortByteString -> Sha2_512_224
newtype Sha2_512_256
Sha2_512_256 :: ShortByteString -> Sha2_512_256
-- | SHA-3 Hash Functions
module Data.Hash.SHA3
newtype Sha3_224
Sha3_224 :: ShortByteString -> Sha3_224
newtype Sha3_256
Sha3_256 :: ShortByteString -> Sha3_256
newtype Sha3_384
Sha3_384 :: ShortByteString -> Sha3_384
newtype Sha3_512
Sha3_512 :: ShortByteString -> Sha3_512
newtype Shake128
Shake128 :: ShortByteString -> Shake128
newtype Shake256
Shake256 :: ShortByteString -> Shake256
module Data.Hash.SipHash
-- | The Word46 constructor parameters represent the 128 bit key
-- in little endian encoding.
data SipHashKey
SipHashKey :: {-# UNPACK #-} !Word64 -> {-# UNPACK #-} !Word64 -> SipHashKey
-- | SipHash with c compression rounds and d finalization
-- rounds.
--
-- cf. http://cr.yp.to/siphash/siphash-20120918.pdf
newtype SipHash (c :: Nat) (d :: Nat)
SipHash :: Word64 -> SipHash (c :: Nat) (d :: Nat)
-- | SipHash, with recommended default parameters of c=2 and d=4.
--
-- The first and second argument is the 128 bit key, represented as two
-- 64 bit words.
sipHash :: SipHashKey -> Ptr Word8 -> Int -> IO (SipHash 2 4)
-- | Generic SipHash with c rounds per block and d finalization rounds.
--
-- The first and second argument is the 128 bit key, represented as two
-- 64 bit words.
sipHashCD :: forall c d. SipHashParam c => SipHashParam d => SipHashKey -> Ptr Word8 -> Int -> IO (SipHash c d)
-- | SipHash-2-4
--
-- The first and second argument is the 128 bit key, represented as two
-- 64 bit words.
sipHash24 :: SipHashKey -> Ptr Word8 -> Int -> IO (SipHash 2 4)
-- | SipHash-1-3
--
-- The first and second argument is the 128 bit key, represented as two
-- 64 bit words.
sipHash13 :: SipHashKey -> Ptr Word8 -> Int -> IO (SipHash 1 3)
-- | SipHash-4-8
--
-- The first and second argument is the 128 bit key, represented as two
-- 64 bit words.
sipHash48 :: SipHashKey -> Ptr Word8 -> Int -> IO (SipHash 4 8)
-- | Internal mutable SipHashContext.
--
-- The first four arguments are the internal state values <math>
-- and the last argument represents the pending bytes from an incomplete
-- word of the last chunk of input.
data SipHashContext (c :: Nat) (d :: Nat)
-- | Initialize a new SipHashContext
sipHashInitialize :: SipHashKey -> SipHashContext c d
-- | Incrementally add input bytes to an SipHash computation and update the
-- internal context.
sipHashUpdate :: forall (c :: Nat) (d :: Nat). SipHashParam c => SipHashContext c d -> Ptr Word8 -> Int -> IO (SipHashContext c d)
sipHashFinalize :: forall (c :: Nat) (d :: Nat). SipHashParam c => SipHashParam d => SipHashContext c d -> SipHash c d
instance GHC.Classes.Ord (Data.Hash.SipHash.SipHash c d)
instance GHC.Classes.Eq (Data.Hash.SipHash.SipHash c d)
instance GHC.Show.Show (Data.Hash.SipHash.SipHash c d)
instance GHC.Classes.Ord Data.Hash.SipHash.SipHashKey
instance GHC.Classes.Eq Data.Hash.SipHash.SipHashKey
instance GHC.Show.Show Data.Hash.SipHash.SipHashKey
instance Data.Hash.SipHash.SipHashRounds n (Data.Hash.SipHash.SlowRounds n) => Data.Hash.SipHash.SipHashParam n
instance Data.Hash.SipHash.SipHashRounds 1 'GHC.Types.False
instance Data.Hash.SipHash.SipHashRounds 2 'GHC.Types.False
instance Data.Hash.SipHash.SipHashRounds 3 'GHC.Types.False
instance Data.Hash.SipHash.SipHashRounds 4 'GHC.Types.False
instance Data.Hash.SipHash.SipHashRounds 5 'GHC.Types.False
instance Data.Hash.SipHash.SipHashRounds 6 'GHC.Types.False
instance Data.Hash.SipHash.SipHashRounds 7 'GHC.Types.False
instance Data.Hash.SipHash.SipHashRounds 8 'GHC.Types.False
instance ((GHC.TypeNats.Internal.CmpNat n 8 Data.Type.Equality.== 'GHC.Types.GT) GHC.Types.~ 'GHC.Types.True, Data.Hash.SipHash.SipHashRounds (n GHC.TypeNats.- 8) t) => Data.Hash.SipHash.SipHashRounds n 'GHC.Types.True
instance (Data.Hash.SipHash.SipHashParam c, Data.Hash.SipHash.SipHashParam d) => Data.Hash.Class.Pure.Internal.IncrementalHash (Data.Hash.SipHash.SipHash c d)
instance (Data.Hash.SipHash.SipHashParam c, Data.Hash.SipHash.SipHashParam d) => Data.Hash.Class.Pure.Salted.Hash (Data.Hash.SipHash.SipHash c d)