packages feed

secp256k1-haskell 1.5.0 → 1.5.1

raw patch · 3 files changed

+15/−8 lines, 3 filesdep ~base16

Dependency ranges changed: base16

Files

CHANGELOG.md view
@@ -4,6 +4,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [1.5.1] - 2026-10-31++### Fixed++- This package is now compatible with base16 version 2.0.+ ## [1.5.0] - 2026-08-12  ### Fixed
secp256k1-haskell.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           secp256k1-haskell-version:        1.5.0+version:        1.5.1 synopsis:       Bindings for secp256k1 description:    Sign and verify signatures using the secp256k1 library. category:       Crypto@@ -41,7 +41,7 @@   build-depends:       QuickCheck >=2.9.2     , base >=4.9 && <5-    , base16 >=1.0+    , base16 >=2.0     , bytestring >=0.10.8     , deepseq >=1.4.2     , entropy >=0.3.8@@ -66,7 +66,7 @@       HUnit     , QuickCheck >=2.9.2     , base >=4.9 && <5-    , base16 >=1.0+    , base16 >=2.0     , bytestring >=0.10.8     , deepseq >=1.4.2     , entropy >=0.3.8
src/Crypto/Secp256k1/Internal/Util.hs view
@@ -1,11 +1,12 @@ {-# LANGUAGE FlexibleContexts #-}+ module Crypto.Secp256k1.Internal.Util where  import Crypto.Secp256k1.Internal.ForeignTypes (Seed32)-import Data.Base16.Types (assertBase16, extractBase16)+import Data.Base16.Types (extractBase16) import Data.ByteString (ByteString) import qualified Data.ByteString as BS-import Data.ByteString.Base16 (decodeBase16, encodeBase16, isBase16)+import Data.ByteString.Base16 (decodeBase16, encodeBase16, parseBase16) import qualified Data.ByteString.Unsafe as BU import Data.String.Conversions (ConvertibleStrings, cs) import Foreign (Ptr, castPtr)@@ -14,9 +15,9 @@  decodeHex :: (ConvertibleStrings a ByteString) => a -> Maybe ByteString decodeHex str =-  if isBase16 $ cs str-    then Just . decodeBase16 $ assertBase16 $ cs str-    else Nothing+  case parseBase16 $ cs str of+    Right b16 -> Just $ decodeBase16 b16+    Left _ -> Nothing  showsHex :: ByteString -> ShowS showsHex = shows . extractBase16 . encodeBase16