cryptohash-cryptoapi-0.1.4: Crypto-api interfaces for cryptohash
LicenseBSD-style
MaintainerVincent Hanquez <[email protected]>
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 MD2 Source #

Instances

Instances details
Show MD2 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Methods

showsPrec :: Int -> MD2 -> ShowS #

show :: MD2 -> String #

showList :: [MD2] -> ShowS #

Serialize MD2 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Methods

put :: Putter MD2 #

get :: Get MD2 #

Eq MD2 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Methods

(==) :: MD2 -> MD2 -> Bool #

(/=) :: MD2 -> MD2 -> Bool #

Ord MD2 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Methods

compare :: MD2 -> MD2 -> Ordering #

(<) :: MD2 -> MD2 -> Bool #

(<=) :: MD2 -> MD2 -> Bool #

(>) :: MD2 -> MD2 -> Bool #

(>=) :: MD2 -> MD2 -> Bool #

max :: MD2 -> MD2 -> MD2 #

min :: MD2 -> MD2 -> MD2 #

Hash CTXMD2 MD2 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

data MD4 Source #

Instances

Instances details
Show MD4 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Methods

showsPrec :: Int -> MD4 -> ShowS #

show :: MD4 -> String #

showList :: [MD4] -> ShowS #

Serialize MD4 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Methods

put :: Putter MD4 #

get :: Get MD4 #

Eq MD4 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Methods

(==) :: MD4 -> MD4 -> Bool #

(/=) :: MD4 -> MD4 -> Bool #

Ord MD4 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Methods

compare :: MD4 -> MD4 -> Ordering #

(<) :: MD4 -> MD4 -> Bool #

(<=) :: MD4 -> MD4 -> Bool #

(>) :: MD4 -> MD4 -> Bool #

(>=) :: MD4 -> MD4 -> Bool #

max :: MD4 -> MD4 -> MD4 #

min :: MD4 -> MD4 -> MD4 #

Hash CTXMD4 MD4 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

data MD5 Source #

Instances

Instances details
Show MD5 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Methods

showsPrec :: Int -> MD5 -> ShowS #

show :: MD5 -> String #

showList :: [MD5] -> ShowS #

Serialize MD5 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Methods

put :: Putter MD5 #

get :: Get MD5 #

Eq MD5 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Methods

(==) :: MD5 -> MD5 -> Bool #

(/=) :: MD5 -> MD5 -> Bool #

Ord MD5 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Methods

compare :: MD5 -> MD5 -> Ordering #

(<) :: MD5 -> MD5 -> Bool #

(<=) :: MD5 -> MD5 -> Bool #

(>) :: MD5 -> MD5 -> Bool #

(>=) :: MD5 -> MD5 -> Bool #

max :: MD5 -> MD5 -> MD5 #

min :: MD5 -> MD5 -> MD5 #

Hash CTXMD5 MD5 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

data SHA1 Source #

Instances

Instances details
Show SHA1 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Methods

showsPrec :: Int -> SHA1 -> ShowS #

show :: SHA1 -> String #

showList :: [SHA1] -> ShowS #

Serialize SHA1 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Methods

put :: Putter SHA1 #

get :: Get SHA1 #

Eq SHA1 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Methods

(==) :: SHA1 -> SHA1 -> Bool #

(/=) :: SHA1 -> SHA1 -> Bool #

Ord SHA1 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Methods

compare :: SHA1 -> SHA1 -> Ordering #

(<) :: SHA1 -> SHA1 -> Bool #

(<=) :: SHA1 -> SHA1 -> Bool #

(>) :: SHA1 -> SHA1 -> Bool #

(>=) :: SHA1 -> SHA1 -> Bool #

max :: SHA1 -> SHA1 -> SHA1 #

min :: SHA1 -> SHA1 -> SHA1 #

Hash CTXSHA1 SHA1 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

data Tiger Source #

Instances

Instances details
Show Tiger Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Methods

showsPrec :: Int -> Tiger -> ShowS #

show :: Tiger -> String #

showList :: [Tiger] -> ShowS #

Serialize Tiger Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Methods

put :: Putter Tiger #

get :: Get Tiger #

Eq Tiger Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Methods

(==) :: Tiger -> Tiger -> Bool #

(/=) :: Tiger -> Tiger -> Bool #

Ord Tiger Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Methods

compare :: Tiger -> Tiger -> Ordering #

(<) :: Tiger -> Tiger -> Bool #

(<=) :: Tiger -> Tiger -> Bool #

(>) :: Tiger -> Tiger -> Bool #

(>=) :: Tiger -> Tiger -> Bool #

max :: Tiger -> Tiger -> Tiger #

min :: Tiger -> Tiger -> Tiger #

Hash CTXTiger Tiger Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

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.

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

Minimal complete definition

outputLength, blockLength, initialCtx, updateCtx, finalize

Methods

outputLength #

Arguments

:: Tagged d BitLength

The size of the digest when encoded

blockLength #

Arguments

:: Tagged d BitLength

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

initialCtx #

Arguments

:: ctx

An initial context, provided with the first call to updateCtx

updateCtx #

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 #

Arguments

:: ctx 
-> ByteString 
-> d

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

hash :: ByteString -> d #

Hash a lazy ByteString, creating a digest

hash' :: ByteString -> d #

Hash a strict ByteString, creating a digest

Instances

Instances details
Hash CTXMD2 MD2 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Hash CTXMD4 MD4 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Hash CTXMD5 MD5 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Hash CTXRIPEMD160 RIPEMD160 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Hash CTXSHA1 SHA1 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Hash CTXSHA224 SHA224 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Hash CTXSHA256 SHA256 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Hash CTXSHA384 SHA384 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Hash CTXSHA512 SHA512 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Hash CTXSkein256_256 Skein256_256 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Hash CTXSkein512_512 Skein512_512 Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Hash CTXTiger Tiger Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Hash CTXWhirlpool Whirlpool Source # 
Instance details

Defined in Crypto.Hash.CryptoAPI

Contexts