Portability | unknown |
---|---|
Stability | experimental |
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Safe Haskell | Trustworthy |
Crypto.Hash
Contents
Description
Crypto hash main module
- class HashAlgorithm a where
- hashInit :: Context a
- hashUpdates :: Context a -> [ByteString] -> Context a
- hashFinalize :: Context a -> Digest a
- data Context a
- data Digest a
- digestToByteString :: Digest a -> ByteString
- digestToHexByteString :: Digest a -> ByteString
- hash :: HashAlgorithm a => ByteString -> Digest a
- hashlazy :: HashAlgorithm a => ByteString -> Digest a
- hashUpdate :: HashAlgorithm a => Context a -> ByteString -> Context a
- data MD2
- data MD4
- data MD5
- data SHA1
- data SHA224
- data SHA256
- data SHA384
- data SHA512
- data RIPEMD160
- data Tiger
- data SHA3_224
- data SHA3_256
- data SHA3_384
- data SHA3_512
- data Skein256_224
- data Skein256_256
- data Skein512_224
- data Skein512_256
- data Skein512_384
- data Skein512_512
- data Whirlpool
Types
class HashAlgorithm a whereSource
Class representing hashing algorithms.
The hash algorithm is built over 3 primitives:
init : create a new context updates : update the context with some strict bytestrings finalize : finalize the context into a digest
Methods
Initialize a new context for this hash algorithm
hashUpdates :: Context a -> [ByteString] -> Context aSource
Update the context with a list of strict bytestring, and return a new context with the updates.
hashFinalize :: Context a -> Digest aSource
Finalize a context and return a digest.
Instances
Represent a digest for a given hash algorithm.
Functions
digestToByteString :: Digest a -> ByteStringSource
Return the binary digest
digestToHexByteString :: Digest a -> ByteStringSource
Return the hexadecimal (base16) bytestring of the digest
hash :: HashAlgorithm a => ByteString -> Digest aSource
Hash a strict bytestring into a digest.
hashlazy :: HashAlgorithm a => ByteString -> Digest aSource
Hash a lazy bytestring into a digest.
hashUpdate :: HashAlgorithm a => Context a -> ByteString -> Context aSource
run hashUpdates on one single bytestring and return the updated context.
hash algorithms
Instances
Instances
Instances
Instances
Instances
Instances
Instances
Instances
Instances
Instances
Instances
Instances
Instances
Instances
data Skein256_224 Source
Instances
data Skein256_256 Source
Instances
data Skein512_224 Source
Instances
data Skein512_256 Source
Instances
data Skein512_384 Source
Instances
data Skein512_512 Source
Instances
Instances