HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

ModulepureMD5-2.1.4Haskell2010

Data.Digest.Pure.MD5

It is suggested you use the 'crypto-api' class-based interface to access the MD5 algorithm. Either rely on type inference or provide an explicit type:

  hashFileStrict = liftM hash' . B.readFile
  hashFileLazyBS = liftM hash . B.readFile
Contents
  1. Types
  2. Static data
  3. Functions
  4. Crypto-API interface
Synopsis
  • PackagepureMD5-2.1.4
  • Exports8
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceMD5.hs

Types

datadata MD5Digest

After finalizing a context, using md5Finalize, a new type is returned to prevent 're-finalizing' the structure.

Instances6Eq, Ord, Show, Binary, Serialize, Hash

Static data

Functions

Processes a lazy ByteString and returns the md5 digest. This is probably what you want. You can use show to produce the standard hex representation.

Alters the MD5Context with a partial digest of the data.

The input bytestring MUST be a multiple of the blockSize or bad things can happen (incorrect digest results)!

Crypto-API interface

classclass (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.

Methods

Instances1Hash