aboutsummaryrefslogtreecommitdiff
path: root/tests/Data/Digest/Md5Tests.hs
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@google.com>2018-03-23 18:34:42 -0400
committerGravatar Benjamin Barenblat <bbaren@google.com>2018-03-23 18:34:42 -0400
commit0ed87caa3481cbb6f8c2e809e5ec7df6f6245406 (patch)
treee7267e4b7996920577aa556ff7a67a312a271216 /tests/Data/Digest/Md5Tests.hs
parent3e898da300395bc3e63780b8d27a97fd4a9c375c (diff)
Data.Digest: Reify hash algorithms
Eliminate the functional interface for hashing. Hashing now occurs exclusively through the `hash` function, which accepts a `Data.Digest.Algorithm`. This makes btls somewhat less extensible, but it’s the most elegant way to support HMACs.
Diffstat (limited to 'tests/Data/Digest/Md5Tests.hs')
-rw-r--r--tests/Data/Digest/Md5Tests.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/Data/Digest/Md5Tests.hs b/tests/Data/Digest/Md5Tests.hs
index f7f62a7..bbc5fba 100644
--- a/tests/Data/Digest/Md5Tests.hs
+++ b/tests/Data/Digest/Md5Tests.hs
@@ -10,12 +10,12 @@ import Test.Tasty.SmallCheck (testProperty)
import Data.Digest.HashTests
(tableTestCase, testAgainstCoreutils, testAgainstOpenssl)
-import Data.Digest.Md5
+import Data.Digest (hash, md5)
tests :: TestTree
tests =
testGroup
- "Data.Digest.Md5"
+ "MD5"
[ testRfcExamples
, testGoExamples
, testCoreutilsConformance
@@ -106,4 +106,4 @@ testOpensslConformance =
-- Convenience function.
-md5sum = show . md5 . ByteString.Lazy.fromStrict
+md5sum = show . hash md5 . ByteString.Lazy.fromStrict