sha256

Pure Haskell SHA-256, HMAC-SHA256 as specified by RFC's 6234 and 2104.
git clone git://git.ppad.tech/sha256.git
Log | Files | Refs | README | LICENSE

commit e11fe1c5e2e832ef5a1a915fcc374c9bfa8e4f67
parent 59af9483d761835f0ff641982bbccc67353ace79
Author: Jared Tobin <jared@jtobin.io>
Date:   Sat, 14 Sep 2024 00:55:25 +0400

lib: remove unused or little-used pragmas

Diffstat:
Mlib/Crypto/Hash/SHA256.hs | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lib/Crypto/Hash/SHA256.hs b/lib/Crypto/Hash/SHA256.hs @@ -1,9 +1,7 @@ {-# OPTIONS_GHC -funbox-small-strict-fields #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE ExtendedLiterals #-} -{-# LANGUAGE LambdaCase #-} {-# LANGUAGE MagicHash #-} -{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE UnboxedTuples #-} {-# LANGUAGE ViewPatterns #-} @@ -154,7 +152,7 @@ pad m = BL.toStrict . BSB.toLazyByteString $ padded where pad_lazy :: BL.ByteString -> BL.ByteString pad_lazy (BL.toChunks -> m) = BL.fromChunks (walk 0 m) where -- walk chunks, calculating length and appending padding - walk !l = \case + walk !l bs = case bs of (c:cs) -> c : walk (l + fi (BS.length c)) cs [] -> padding l (sol l) (BSB.word8 0x80)