packages feed

secp256k1-haskell 0.3.0 → 0.3.1

raw patch · 4 files changed

+30/−26 lines, 4 files

Files

CHANGELOG.md view
@@ -4,6 +4,10 @@ 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). +## 0.3.1+### Fixed+- Use unsafe calls in FFI.+ ## 0.3.0 ### Fixed - Compiles with all flags now.
secp256k1-haskell.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: d55c31829652e236145323f89ee1ec9c61e4f18712778a13011c688d36db8b19+-- hash: a6861180774adce26925996e63a710235483c286bdea253bdf7d3daa64862113  name:           secp256k1-haskell-version:        0.3.0+version:        0.3.1 synopsis:       Bindings for secp256k1 description:    Sign and verify signatures using the secp256k1 library. category:       Crypto
src/Crypto/Secp256k1/Internal.hs view
@@ -197,24 +197,24 @@     unless (isSuccess ret) $ error "failed to randomize context"     return x -foreign import ccall+foreign import ccall unsafe     "secp256k1.h secp256k1_context_create"     contextCreate     :: CtxFlags     -> IO (Ptr Ctx) -foreign import ccall+foreign import ccall unsafe     "secp256k1.h secp256k1_context_clone"     contextClone     :: Ptr Ctx     -> IO (Ptr Ctx) -foreign import ccall+foreign import ccall unsafe     "secp256k1.h &secp256k1_context_destroy"     contextDestroy     :: FunPtr (Ptr Ctx -> IO ()) -foreign import ccall+foreign import ccall unsafe     "secp256k1.h secp256k1_context_set_illegal_callback"     setIllegalCallback     :: Ptr Ctx@@ -222,7 +222,7 @@     -> Ptr a                              -- ^ data     -> IO () -foreign import ccall+foreign import ccall unsafe     "secp256k1.h secp256k1_context_set_error_callback"     setErrorCallback     :: Ptr Ctx@@ -230,7 +230,7 @@     -> Ptr a                              -- ^ data     -> IO () -foreign import ccall+foreign import ccall unsafe     "secp256k1.h secp256k1_ec_pubkey_parse"     ecPubKeyParse     :: Ptr Ctx@@ -239,7 +239,7 @@     -> CSize      -- ^ size of encoded public key array     -> IO Ret -foreign import ccall+foreign import ccall unsafe     "secp256k1.h secp256k1_ec_pubkey_serialize"     ecPubKeySerialize     :: Ptr Ctx@@ -249,7 +249,7 @@     -> SerFlags     -> IO Ret -foreign import ccall+foreign import ccall unsafe     "secp256k1.h secp256k1_ecdsa_signature_parse_compact"     ecdsaSignatureParseCompact     :: Ptr Ctx@@ -258,7 +258,7 @@     -> IO Ret  -foreign import ccall+foreign import ccall unsafe     "secp256k1.h secp256k1_ecdsa_signature_parse_der"     ecdsaSignatureParseDer     :: Ptr Ctx@@ -267,7 +267,7 @@     -> CSize      -- ^ size of encoded signature     -> IO Ret -foreign import ccall+foreign import ccall unsafe     "secp256k1.h secp256k1_ecdsa_signature_serialize_der"     ecdsaSignatureSerializeDer     :: Ptr Ctx@@ -276,7 +276,7 @@     -> Ptr Sig64     -> IO Ret -foreign import ccall+foreign import ccall unsafe     "secp256k1.h secp256k1_ecdsa_signature_serialize_compact"     ecdsaSignatureSerializeCompact     :: Ptr Ctx@@ -284,7 +284,7 @@     -> Ptr Sig64     -> IO Ret -foreign import ccall+foreign import ccall unsafe     "secp256k1.h secp256k1_ecdsa_verify"     ecdsaVerify     :: Ptr Ctx@@ -293,7 +293,7 @@     -> Ptr PubKey64     -> IO Ret -foreign import ccall+foreign import ccall unsafe     "secp256k1.h secp256k1_ecdsa_signature_normalize"     ecdsaSignatureNormalize     :: Ptr Ctx@@ -301,7 +301,7 @@     -> Ptr Sig64 -- ^ input     -> IO Ret -foreign import ccall+foreign import ccall unsafe     "secp256k1.h secp256k1_ecdsa_sign"     ecdsaSign     :: Ptr Ctx@@ -312,14 +312,14 @@     -> Ptr a -- ^ nonce data     -> IO Ret -foreign import ccall+foreign import ccall unsafe     "secp256k1.h secp256k1_ec_seckey_verify"     ecSecKeyVerify     :: Ptr Ctx     -> Ptr SecKey32     -> IO Ret -foreign import ccall+foreign import ccall unsafe     "secp256k1.h secp256k1_ec_pubkey_create"     ecPubKeyCreate     :: Ptr Ctx@@ -327,7 +327,7 @@     -> Ptr SecKey32     -> IO Ret -foreign import ccall+foreign import ccall unsafe     "secp256k1.h secp256k1_ec_privkey_tweak_add"     ecSecKeyTweakAdd     :: Ptr Ctx@@ -335,14 +335,14 @@     -> Ptr Tweak32     -> IO Ret -foreign import ccall+foreign import ccall unsafe     "secp256k1.h secp256k1_ec_privkey_negate"     ecTweakNegate     :: Ptr Ctx     -> Ptr Tweak32     -> IO Ret -foreign import ccall+foreign import ccall unsafe     "secp256k1.h secp256k1_ec_pubkey_tweak_add"     ecPubKeyTweakAdd     :: Ptr Ctx@@ -350,7 +350,7 @@     -> Ptr Tweak32     -> IO Ret -foreign import ccall+foreign import ccall unsafe     "secp256k1.h secp256k1_ec_privkey_tweak_mul"     ecSecKeyTweakMul     :: Ptr Ctx@@ -358,7 +358,7 @@     -> Ptr Tweak32     -> IO Ret -foreign import ccall+foreign import ccall unsafe     "secp256k1.h secp256k1_ec_pubkey_tweak_mul"     ecPubKeyTweakMul     :: Ptr Ctx@@ -366,14 +366,14 @@     -> Ptr Tweak32     -> IO Ret -foreign import ccall+foreign import ccall unsafe     "secp256k1.h secp256k1_context_randomize"     contextRandomize     :: Ptr Ctx     -> Ptr Seed32     -> IO Ret -foreign import ccall+foreign import ccall unsafe     "secp256k1.h secp256k1_ec_pubkey_combine"     ecPubKeyCombine     :: Ptr Ctx
test/Crypto/Secp256k1/InternalSpec.hs view
@@ -17,7 +17,7 @@ spec = do     describe "housekeeping" $ do         it "creates context" createContextTest-        it "randomizez context" randomizeContextTest+        it "randomizes context" randomizeContextTest         it "clones context" cloneContextTest     describe "serialization" $ do         it "parses public key" ecPubkeyParseTest