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. --- btls.cabal | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'btls.cabal') diff --git a/btls.cabal b/btls.cabal index 9844a5a..63af3db 100644 --- a/btls.cabal +++ b/btls.cabal @@ -33,9 +33,6 @@ library -Wno-safe -Wno-unsafe -optl-Wl,-z,relro -optl-Wl,-z,now -optl-Wl,-s exposed-modules: Data.Digest - , Data.Digest.Md5 - , Data.Digest.Sha1 - , Data.Digest.Sha2 other-modules: Data.Digest.Internal -- Use special names for the BoringSSL libraries to avoid accidentally pulling -- in OpenSSL. @@ -57,7 +54,8 @@ test-suite tests -Wno-safe -Wno-unsafe -optl-Wl,-z,relro -optl-Wl,-z,now -optl-Wl,-s main-is: Tests.hs - other-modules: Data.Digest.HashTests + other-modules: Data.DigestTests + , Data.Digest.HashTests , Data.Digest.Md5Tests , Data.Digest.Sha1Tests , Data.Digest.Sha2Tests -- cgit v1.2.3