From 0ed87caa3481cbb6f8c2e809e5ec7df6f6245406 Mon Sep 17 00:00:00 2001 From: Benjamin Barenblat Date: Fri, 23 Mar 2018 18:34:42 -0400 Subject: Data.Digest: Reify hash algorithms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- tests/Data/Digest/Md5Tests.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/Data/Digest/Md5Tests.hs') 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 -- cgit v1.2.3