Portability | unknown |
---|---|
Stability | experimental |
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Safe Haskell | None |
Crypto.Hash.CryptoAPI
Description
Cryptohash API exported through crypto-api.
Note: Current version (0.10) of crypto-api suffers a small performance problem. see http://tab.snarc.org/others/benchmark-cryptohash-0.8.html. Hopefully, future versions will fix this.
- data MD2
- data MD4
- data MD5
- data SHA1
- data SHA224
- data SHA256
- data SHA384
- data SHA512
- data Skein256_256
- data Skein512_512
- data RIPEMD160
- data Tiger
- data Whirlpool
- class (Serialize d, Eq d, Ord d) => Hash ctx d | d -> ctx, ctx -> d where
- outputLength :: Tagged * d BitLength
- blockLength :: Tagged * d BitLength
- initialCtx :: ctx
- updateCtx :: ctx -> ByteString -> ctx
- finalize :: ctx -> ByteString -> d
- hash :: Hash ctx d => ByteString -> d
- hash' :: Hash ctx d => ByteString -> d
Documentation
data Skein256_256 Source
Instances
Eq Skein256_256 | |
Ord Skein256_256 | |
Show Skein256_256 | |
Serialize Skein256_256 | |
Hash CTXSkein256_256 Skein256_256 |
data Skein512_512 Source
Instances
Eq Skein512_512 | |
Ord Skein512_512 | |
Show Skein512_512 | |
Serialize Skein512_512 | |
Hash CTXSkein512_512 Skein512_512 |
class (Serialize d, Eq d, Ord d) => Hash ctx d | d -> ctx, ctx -> d where
The Hash class is intended as the generic interface
targeted by maintainers of Haskell digest implementations.
Using this generic interface, higher level functions
such as hash
and hash'
provide a useful API
for comsumers of hash implementations.
Any instantiated implementation must handle unaligned data
Methods
Arguments
:: Tagged * d BitLength | The amount of data operated on in each round of the digest computation |
Arguments
:: ctx | An initial context, provided with the first call to |
Arguments
:: ctx | |
-> ByteString | |
-> ctx | Used to update a context, repeatedly called until all data is exhausted
must operate correctly for imputs of |
Arguments
:: ctx | |
-> ByteString | |
-> d | Finializing a context, plus any message data less than the block size, into a digest |
Instances
Hash Ctx MD2 | |
Hash Ctx MD4 | |
Hash Ctx MD5 | |
Hash Ctx SHA1 | |
Hash Ctx SHA224 | |
Hash Ctx SHA256 | |
Hash Ctx SHA384 | |
Hash Ctx SHA512 | |
Hash Ctx SHA3 | |
Hash Ctx RIPEMD160 | |
Hash Ctx Tiger | |
Hash Ctx Skein256 | |
Hash Ctx Skein512 | |
Hash Ctx Whirlpool | |
Hash CTXSkein512_512 Skein512_512 | |
Hash CTXSkein256_256 Skein256_256 | |
Hash CTXWhirlpool Whirlpool | |
Hash CTXTiger Tiger | |
Hash CTXRIPEMD160 RIPEMD160 | |
Hash CTXSHA512 SHA512 | |
Hash CTXSHA384 SHA384 | |
Hash CTXSHA256 SHA256 | |
Hash CTXSHA224 SHA224 | |
Hash CTXSHA1 SHA1 | |
Hash CTXMD5 MD5 | |
Hash CTXMD4 MD4 | |
Hash CTXMD2 MD2 |
hash :: Hash ctx d => ByteString -> d
Hash a lazy ByteString, creating a digest
hash' :: Hash ctx d => ByteString -> d
Hash a strict ByteString, creating a digest