crypto-pubkey-0.2.8: Public Key cryptography

License | BSD-style
Maintainer | Vincent Hanquez <vincent@snarc.org>
Stability | experimental
Portability | Good
Safe Haskell | None
Language | Haskell98

Crypto.PubKey.HashDescr

Contents

- Types
- List of known hash description

Description

Standard digests wrapped in ASN1 structure

Synopsis

- type HashFunction = ByteString -> ByteString
- data HashDescr = HashDescr {
  - hashFunction :: HashFunction
  - digestToASN1 :: ByteString -> ByteString
  }
- hashDescrMD2 :: HashDescr
- hashDescrMD5 :: HashDescr
- hashDescrSHA1 :: HashDescr
- hashDescrSHA224 :: HashDescr
- hashDescrSHA256 :: HashDescr
- hashDescrSHA384 :: HashDescr
- hashDescrSHA512 :: HashDescr
- hashDescrRIPEMD160 :: HashDescr

# Types

type HashFunction = ByteString -> ByteString Source

A standard hash function returning a digest object

data HashDescr Source

Describe a hash function and a way to wrap the digest into an DER encoded ASN1 marshalled structure.

Constructors

HashDescr |

Fields

hashFunction :: HashFunction

  hash function

digestToASN1 :: ByteString -> ByteString

  convertion to an ASN1 wrapped digest bytestring

# List of known hash description

hashDescrMD2 :: HashDescr Source

Describe the MD2 hashing algorithm

hashDescrMD5 :: HashDescr Source

Describe the MD5 hashing algorithm

hashDescrSHA1 :: HashDescr Source

Describe the SHA1 hashing algorithm

hashDescrSHA224 :: HashDescr Source

Describe the SHA224 hashing algorithm

hashDescrSHA256 :: HashDescr Source

Describe the SHA256 hashing algorithm

hashDescrSHA384 :: HashDescr Source

Describe the SHA384 hashing algorithm

hashDescrSHA512 :: HashDescr Source

Describe the SHA512 hashing algorithm

hashDescrRIPEMD160 :: HashDescr Source

Describe the RIPEMD160 hashing algorithm