1cabal-version:       >=1.10
2name:                cryptohash-md5
3version:             0.11.100.1
4x-revision: 6
5
6synopsis:            Fast, pure and practical MD5 implementation
7description: {
8
9A practical incremental and one-pass, pure API to the
10<https://en.wikipedia.org/wiki/MD5 MD5 hash algorithm>
11(including <https://en.wikipedia.org/wiki/HMAC HMAC> support)
12with performance close to the fastest implementations available in other languages.
13.
14The implementation is made in C with a haskell FFI wrapper that hides the C implementation.
15.
16If, instead, you require a pure Haskell implementation and performance is secondary, please refer to the [pureMD5 package](https://hackage.haskell.org/package/pureMD5).
17.
18=== Packages in the @cryptohash-*@ family
19.
20- <https://hackage.haskell.org/package/cryptohash-md5    cryptohash-md5>
21- <https://hackage.haskell.org/package/cryptohash-sha1   cryptohash-sha1>
22- <https://hackage.haskell.org/package/cryptohash-sha256 cryptohash-sha256>
23- <https://hackage.haskell.org/package/cryptohash-sha512 cryptohash-sha512>
24.
25=== Relationship to the @cryptohash@ package and its API
26.
27This package has been originally a fork of @cryptohash-0.11.7@ because the @cryptohash@
28package had been deprecated and so this package continues to satisfy the need for a
29lightweight package providing the MD5 hash algorithm without any dependencies on packages
30other than @base@ and @bytestring@. The API exposed by @cryptohash-md5-0.11.*@'s
31"Crypto.Hash.MD5" module is guaranteed to remain a compatible superset of the API provided
32by the @cryptohash-0.11.7@'s module of the same name.
33.
34Consequently, this package is designed to be used as a drop-in replacement for @cryptohash-0.11.7@'s
35"Crypto.Hash.MD5" module, though with
36a [clearly smaller footprint by almost 3 orders of magnitude](https://www.reddit.com/r/haskell/comments/5lxv75/psa_please_use_unique_module_names_when_uploading/dbzegx3/).
37.
38
39}
40
41license:             BSD3
42license-file:        LICENSE
43copyright:           Vincent Hanquez, Herbert Valerio Riedel
44maintainer:          Herbert Valerio Riedel <hvr@gnu.org>
45homepage:            https://github.com/hvr/cryptohash-md5
46bug-reports:         https://github.com/hvr/cryptohash-md5/issues
47category:            Data, Cryptography
48build-type:          Simple
49tested-with:         GHC == 7.4.2
50                   , GHC == 7.6.3
51                   , GHC == 7.8.4
52                   , GHC == 7.10.3
53                   , GHC == 8.0.1
54
55extra-source-files:  cbits/md5.h
56                     changelog.md
57
58source-repository head
59  type:     git
60  location: https://github.com/hvr/cryptohash-md5.git
61
62library
63  default-language:  Haskell2010
64  build-depends:     base             >= 4.5   && < 4.16
65                   , bytestring       >= 0.9.2 && < 0.11
66
67  hs-source-dirs:    src
68  exposed-modules:   Crypto.Hash.MD5
69  ghc-options:       -Wall -fno-cse -O2
70  cc-options:        -Wall -O3
71  c-sources:         cbits/md5.c
72  include-dirs:      cbits
73
74test-suite test-md5
75  default-language:  Haskell2010
76  other-extensions:  OverloadedStrings
77  type:              exitcode-stdio-1.0
78  hs-source-dirs:    src-tests
79  main-is:           test-md5.hs
80  ghc-options:       -Wall -threaded
81  build-depends:     cryptohash-md5
82                   , base
83                   , bytestring
84
85                   , base16-bytestring >= 0.1.1  && < 0.2
86                   , pureMD5           >= 2.1.3  && < 2.2
87                   , tasty             == 0.11.*
88                   , tasty-quickcheck  == 0.8.*
89                   , tasty-hunit       == 0.9.*
90
91benchmark bench-md5
92  default-language:  Haskell2010
93  type:              exitcode-stdio-1.0
94  main-is:           bench-md5.hs
95  hs-source-dirs:    src-bench
96  build-depends:     cryptohash-md5
97                   , base
98                   , bytestring
99                   , criterion        == 1.1.*
100