cryptohash-cryptoapi-0.1.4: Crypto-api interfaces for cryptohash

LicenseBSD-style
MaintainerVincent Hanquez <vincent@snarc.org>
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell98

Crypto.Hash.CryptoAPI

Contents

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.

Synopsis

Documentation

data Skein256_256 Source #

Instances
Eq Skein256_256 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Ord Skein256_256 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Show Skein256_256 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Serialize Skein256_256 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Hash CTXSkein256_256 Skein256_256 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

data Skein512_512 Source #

Instances
Eq Skein512_512 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Ord Skein512_512 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Show Skein512_512 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Serialize Skein512_512 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Hash CTXSkein512_512 Skein512_512 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

class (Serialize d, Eq d, Ord d) => Hash ctx d | d -> ctx, ctx -> d where Source #

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.

Minimum complete definition: outputLength, blockLength, initialCtx, updateCtx, and finalize.

Minimal complete definition

outputLength, blockLength, initialCtx, updateCtx, finalize

Methods

outputLength Source #

Arguments

:: Tagged d BitLength

The size of the digest when encoded

blockLength Source #

Arguments

:: Tagged d BitLength

The amount of data operated on in each round of the digest computation

initialCtx Source #

Arguments

:: ctx

An initial context, provided with the first call to updateCtx

updateCtx Source #

Arguments

:: ctx 
-> ByteString 
-> ctx

Used to update a context, repeatedly called until all data is exhausted must operate correctly for imputs of n*blockLength bytes for n elem [0..]

finalize Source #

Arguments

:: ctx 
-> ByteString 
-> d

Finializing a context, plus any message data less than the block size, into a digest

hash :: ByteString -> d Source #

Hash a lazy ByteString, creating a digest

hash' :: ByteString -> d Source #

Hash a strict ByteString, creating a digest

Instances
Hash CTXSkein512_512 Skein512_512 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Hash CTXSkein256_256 Skein256_256 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Hash CTXWhirlpool Whirlpool Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Hash CTXTiger Tiger Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Hash CTXRIPEMD160 RIPEMD160 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Hash CTXSHA512 SHA512 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Hash CTXSHA384 SHA384 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Hash CTXSHA256 SHA256 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Hash CTXSHA224 SHA224 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Hash CTXSHA1 SHA1 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Hash CTXMD5 MD5 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Hash CTXMD4 MD4 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Hash CTXMD2 MD2 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Contexts