Browse Source

compatibility with latest libsecp256k1 (20181105) (#33)

anonswap
Robert Ayrapetyan 6 years ago
committed by Ofek Lev
parent
commit
d91552f811
  1. 4
      _cffi_build/secp256k1_ecdh.h
  2. 4
      coincurve/_windows_libsecp256k1.py
  3. 2
      coincurve/keys.py
  4. 2
      setup.py

4
_cffi_build/secp256k1_ecdh.h

@ -2,5 +2,7 @@ int secp256k1_ecdh(
const secp256k1_context* ctx,
unsigned char *result,
const secp256k1_pubkey *pubkey,
const unsigned char *privkey
const unsigned char *privkey,
void *hashfp,
void *data
);

4
coincurve/_windows_libsecp256k1.py

@ -223,7 +223,9 @@ int secp256k1_ecdh(
const secp256k1_context* ctx,
unsigned char *result,
const secp256k1_pubkey *pubkey,
const unsigned char *privkey
const unsigned char *privkey,
void *hashfp,
void *data
);
"""

2
coincurve/keys.py

@ -70,7 +70,7 @@ class PrivateKey:
lib.secp256k1_ecdh(
self.context.ctx, secret, PublicKey(public_key).public_key,
self.secret
self.secret, ffi.NULL, ffi.NULL
)
return bytes(ffi.buffer(secret, 32))

2
setup.py

@ -33,7 +33,7 @@ MAKE = 'gmake' if platform.system() in ['FreeBSD'] else 'make'
# Version of libsecp256k1 to download if none exists in the `libsecp256k1`
# directory
LIB_TARBALL_URL = 'https://github.com/bitcoin-core/secp256k1/archive/1e6f1f5ad5e7f1e3ef79313ec02023902bf8175c.tar.gz'
LIB_TARBALL_URL = 'https://github.com/bitcoin-core/secp256k1/archive/314a61d72474aa29ff4afba8472553ad91d88e9d.tar.gz'
# We require setuptools >= 3.3

Loading…
Cancel
Save