Crypto.Hash.MD5

cryptohash-0.7.10: collection of crypto hashes, fast, pure and practical

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

Crypto.Hash.MD5

Contents

- Incremental hashing Functions
- Single Pass hashing

Description

A module containing MD5 bindings

Synopsis

- data Ctx = Ctx !ByteString
- data MD5
- init :: Ctx
- update :: Ctx -> ByteString -> Ctx
- finalize :: Ctx -> ByteString
- hash :: ByteString -> ByteString
- hashlazy :: ByteString -> ByteString

# Documentation

data Ctx

Constructors

Ctx !ByteString |

Instances

Hash Ctx MD5 |

data MD5

Instances

Eq MD5 |
Ord MD5 |
Show MD5 |
Serialize MD5 |
Hash Ctx MD5 |

# Incremental hashing Functions

init :: Ctx

init a context

update :: Ctx -> ByteString -> Ctx

update a context with a bytestring

finalize :: Ctx -> ByteString

finalize the context into a digest bytestring

# Single Pass hashing

hash :: ByteString -> ByteString

hash a strict bytestring into a digest bytestring

hashlazy :: ByteString -> ByteString

hash a lazy bytestring into a digest bytestring