commit 2841c31e6d627e4e50144e4695c1a0ca6a6fc001
parent 61fc95a536d79d37f4a05e114d4440ec3c388ace
Author: Jared Tobin <jared@jtobin.io>
Date: Fri, 11 Oct 2024 14:12:21 +0400
lib: dubious bangs
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/Crypto/Curve/Secp256k1.hs b/lib/Crypto/Curve/Secp256k1.hs
@@ -488,7 +488,7 @@ bits2int bs =
-- RFC6979 2.3.3
int2octets :: Integer -> BS.ByteString
int2octets i = pad (unroll i) where
- pad !bs
+ pad bs
| BS.length bs < fi _CURVE_Q_BYTES = pad (BS.cons 0 bs)
| otherwise = bs
@@ -592,7 +592,7 @@ gen_k :: DRBG.DRBG s -> ST s Integer
gen_k g = loop g where
loop drbg = do
bytes <- DRBG.gen mempty (fi _CURVE_Q_BYTES) drbg
- let !can = bits2int bytes
+ let can = bits2int bytes
if can >= _CURVE_Q
then loop drbg
else pure can