Class representing hashing algorithms.
The interface presented here is update in place and lowlevel. the Hash module takes care of hidding the mutable interface properly.
Associated types
type family HashBlockSize a :: NatAssociated type for the block size of the hash algorithm
type family HashDigestSize a :: NatAssociated type for the digest size of the hash algorithm
type family HashInternalContextSize a :: NatAssociated type for the internal context size of the hash algorithm
Methods
hashBlockSize :: a -> IntGet the block size of a hash algorithm
hashDigestSize :: a -> IntGet the digest size of a hash algorithm
hashInternalContextSize :: a -> IntGet the size of the context used for a hash algorithm
hashInternalInit :: Ptr (Context a) -> IO ()Initialize a context pointer to the initial state of a hash algorithm
hashInternalUpdate :: Ptr (Context a) -> Ptr Word8 -> Word32 -> IO ()Update the context with some raw data
hashInternalFinalize :: Ptr (Context a) -> Ptr (Digest a) -> IO ()Finalize the context and set the digest raw memory to the right value
Instances44HashAlgorithm, …
HashAlgorithm Blake2b_160Defined in cryptonite-0.30 · Crypto.Hash.Blake2bHashAlgorithm Blake2b_224Defined in cryptonite-0.30 · Crypto.Hash.Blake2bHashAlgorithm Blake2b_256Defined in cryptonite-0.30 · Crypto.Hash.Blake2bHashAlgorithm Blake2b_384Defined in cryptonite-0.30 · Crypto.Hash.Blake2bHashAlgorithm Blake2b_512Defined in cryptonite-0.30 · Crypto.Hash.Blake2bHashAlgorithm Blake2bp_512Defined in cryptonite-0.30 · Crypto.Hash.Blake2bpHashAlgorithm Blake2s_160Defined in cryptonite-0.30 · Crypto.Hash.Blake2sHashAlgorithm Blake2s_224Defined in cryptonite-0.30 · Crypto.Hash.Blake2sHashAlgorithm Blake2s_256Defined in cryptonite-0.30 · Crypto.Hash.Blake2sHashAlgorithm Blake2sp_224Defined in cryptonite-0.30 · Crypto.Hash.Blake2spHashAlgorithm Blake2sp_256Defined in cryptonite-0.30 · Crypto.Hash.Blake2spHashAlgorithm Keccak_224Defined in cryptonite-0.30 · Crypto.Hash.KeccakHashAlgorithm Keccak_256Defined in cryptonite-0.30 · Crypto.Hash.KeccakHashAlgorithm Keccak_384Defined in cryptonite-0.30 · Crypto.Hash.KeccakHashAlgorithm Keccak_512Defined in cryptonite-0.30 · Crypto.Hash.KeccakHashAlgorithm MD2Defined in cryptonite-0.30 · Crypto.Hash.MD2HashAlgorithm MD4Defined in cryptonite-0.30 · Crypto.Hash.MD4HashAlgorithm MD5Defined in cryptonite-0.30 · Crypto.Hash.MD5HashAlgorithm RIPEMD160Defined in cryptonite-0.30 · Crypto.Hash.RIPEMD160HashAlgorithm SHA1Defined in cryptonite-0.30 · Crypto.Hash.SHA1HashAlgorithm SHA224Defined in cryptonite-0.30 · Crypto.Hash.SHA224HashAlgorithm SHA256Defined in cryptonite-0.30 · Crypto.Hash.SHA256HashAlgorithm SHA3_224Defined in cryptonite-0.30 · Crypto.Hash.SHA3HashAlgorithm SHA3_256Defined in cryptonite-0.30 · Crypto.Hash.SHA3HashAlgorithm SHA3_384Defined in cryptonite-0.30 · Crypto.Hash.SHA3HashAlgorithm SHA3_512Defined in cryptonite-0.30 · Crypto.Hash.SHA3HashAlgorithm SHA384Defined in cryptonite-0.30 · Crypto.Hash.SHA384HashAlgorithm SHA512Defined in cryptonite-0.30 · Crypto.Hash.SHA512HashAlgorithm SHA512t_224Defined in cryptonite-0.30 · Crypto.Hash.SHA512tHashAlgorithm SHA512t_256Defined in cryptonite-0.30 · Crypto.Hash.SHA512tHashAlgorithm Skein256_224Defined in cryptonite-0.30 · Crypto.Hash.Skein256HashAlgorithm Skein256_256Defined in cryptonite-0.30 · Crypto.Hash.Skein256HashAlgorithm Skein512_224Defined in cryptonite-0.30 · Crypto.Hash.Skein512HashAlgorithm Skein512_256Defined in cryptonite-0.30 · Crypto.Hash.Skein512HashAlgorithm Skein512_384Defined in cryptonite-0.30 · Crypto.Hash.Skein512HashAlgorithm Skein512_512Defined in cryptonite-0.30 · Crypto.Hash.Skein512HashAlgorithm TigerDefined in cryptonite-0.30 · Crypto.Hash.TigerHashAlgorithm WhirlpoolDefined in cryptonite-0.30 · Crypto.Hash.WhirlpoolKnownNat bitlen => HashAlgorithm (SHAKE128 bitlen)Defined in cryptonite-0.30 · Crypto.Hash.SHAKEKnownNat bitlen => HashAlgorithm (SHAKE256 bitlen)Defined in cryptonite-0.30 · Crypto.Hash.SHAKE(IsDivisibleBy8 bitlen, KnownNat bitlen, IsAtLeast bitlenDefined in cryptonite-0.30 · Crypto.Hash.Blake28
, IsAtMost bitlen256
) => HashAlgorithm (Blake2s bitlen)(IsDivisibleBy8 bitlen, KnownNat bitlen, IsAtLeast bitlenDefined in cryptonite-0.30 · Crypto.Hash.Blake28
, IsAtMost bitlen256
) => HashAlgorithm (Blake2sp bitlen)(IsDivisibleBy8 bitlen, KnownNat bitlen, IsAtLeast bitlenDefined in cryptonite-0.30 · Crypto.Hash.Blake28
, IsAtMost bitlen512
) => HashAlgorithm (Blake2b bitlen)(IsDivisibleBy8 bitlen, KnownNat bitlen, IsAtLeast bitlenDefined in cryptonite-0.30 · Crypto.Hash.Blake28
, IsAtMost bitlen512
) => HashAlgorithm (Blake2bp bitlen)