From c02838a0bf9b171e1b98689f105826e21f149f14 Mon Sep 17 00:00:00 2001 From: ofek Date: Tue, 28 Mar 2017 14:08:04 -0400 Subject: [PATCH] use ludbb/secp256k1-py#17 --- coincurve/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coincurve/__init__.py b/coincurve/__init__.py index 0e5dc3874..5461681d2 100644 --- a/coincurve/__init__.py +++ b/coincurve/__init__.py @@ -178,7 +178,7 @@ def serialize(self, compressed=True): assert self.public_key, "No public key defined" len_compressed = 33 if compressed else 65 - res_compressed = ffi.new('char [%d]' % len_compressed) + res_compressed = ffi.new('unsigned char [%d]' % len_compressed) outlen = ffi.new('size_t *', len_compressed) compflag = EC_COMPRESSED if compressed else EC_UNCOMPRESSED @@ -385,7 +385,7 @@ def _tweak_private(inst, func, scalar): raise TypeError('scalar must be composed of 32 bytes') # Create a copy of the current private key. - key = ffi.new('char [32]', inst.private_key) + key = ffi.new('unsigned char [32]', inst.private_key) res = func(inst.ctx, key, scalar) if not res: