Permalink
Browse files

Bump version, tighten imports and build-deps, minor documentation fixes.

Ignore-this: cacda8c54eca104e46d92c290caa0a91

darcs-hash:20100923055714-cef97-83d679cf1715123da0e75c4a17e8fb1a26b6e5c8.gz
  • Loading branch information...
1 parent b357a26 commit 19cca34899b421c3d2a00c26a1a5bc7534380bcc @TomMD committed Sep 23, 2010
Showing with 11 additions and 10 deletions.
  1. +9 −8 Data/Digest/Pure/MD5.hs
  2. +2 −2 pureMD5.cabal
@@ -8,14 +8,14 @@
-- Portability : portable, requires bang patterns and ByteString
-- Tested with : GHC-6.8.1
--
--- |To get an MD5 digest of a lazy ByteString (you probably want this):
--- hash = md5 lazyByteString
+-- | 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:
--
--- Alternativly, for a context that can be further updated/finalized:
--- partialCtx = md5Update md5InitialContext partOfFile
+-- @
+-- hashFileStrict = liftM hash' B.readFile
+-- hashFileLazyBS = liftM hash B.readFile
+-- @
--
--- And you finialize the context with:
--- hash = md5Finalize partialCtx
-----------------------------------------------------------------------------
module Data.Digest.Pure.MD5
@@ -25,11 +25,12 @@ module Data.Digest.Pure.MD5
, MD5Digest
-- * Static data
, md5InitialContext
- , blockSize
-- * Functions
, md5
, md5Update
, md5Finalize
+ -- * Crypto-API interface
+ , Hash(..)
) where
import Data.ByteString.Unsafe (unsafeUseAsCString)
@@ -50,7 +51,7 @@ import Data.Binary.Put
import qualified Data.Serialize.Get as G
import qualified Data.Serialize.Put as P
import qualified Data.Serialize as S
-import Crypto.Classes
+import Crypto.Classes (Hash(..), hash)
import Data.Tagged
import Numeric
View
@@ -1,5 +1,5 @@
name: pureMD5
-version: 2.0.0.0
+version: 2.1.0.0
license: BSD3
license-file: LICENSE
author: Thomas DuBuisson <thomas.dubuisson@gmail.com>
@@ -23,7 +23,7 @@ flag test
default: False
Library
- Build-Depends: base == 4.*, bytestring >= 0.9 && < 0.10, binary >= 0.4.0 && < 0.6.0, cereal >= 0.2, crypto-api >= 0.0.0.1, tagged
+ Build-Depends: base == 4.*, bytestring >= 0.9 && < 0.10, binary >= 0.4.0 && < 0.6.0, cereal >= 0.2 && < 0.4, crypto-api < 0.2, tagged
ghc-options: -O2 -funfolding-use-threshold66 -funfolding-creation-threshold66 -fexcess-precision -funbox-strict-fields
hs-source-dirs:
exposed-modules: Data.Digest.Pure.MD5

0 comments on commit 19cca34

Please sign in to comment.