bitcoin-secp256k1 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '038eab383cf48791b0fec41361ffd2d12ebc0e8f237e1c8610abef9884380400'
4
- data.tar.gz: 50a54d28c8ed10245ffa16dab0c73e7a336505dca71ce859416028428878a9ea
3
+ metadata.gz: d36e6ccb0fd0eb123a66a40139756f414c8fc23642be70aa45cbab0e4a73ee84
4
+ data.tar.gz: 2c1ffa147209b75f43686231df61b98675d67fa0f83f88170db21ec408a185e0
5
5
  SHA512:
6
- metadata.gz: bdbf5f0f3b92a943d37db6c352e078f6bdcafae23a4d04a72d9fa51e499b0f94211d80898084457ee349fc846f217e4c46bcd0c10251854dd3210b66171ce163
7
- data.tar.gz: fa51063d85e791793c9314efe3aee7084005d8f854e5f941d725529aa37d69b89542136b2592d567a3aba9ae70d2c240c9f556864f656de4706ccecbfb301f16
6
+ metadata.gz: ef8f810a7f40748c362bd8e4c1162486efbb9a8330906129075f7819b1d6b1cf88835e4247cc617c5d3073ed4625af9dbef1dd277030b5b92e564c4c7580f6b9
7
+ data.tar.gz: 8a428f795271a7878bafd6282e10128f52f99b6bda7539b85a90d412b1d411339970236363c763766fb3ecbaff596197407c12441d0c2fe2062c904d6659bc7b
@@ -1,13 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bitcoin-secp256k1 (0.5.0)
4
+ bitcoin-secp256k1 (0.5.1)
5
5
  ffi (>= 1.9.25)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- ffi (1.9.25)
10
+ ffi (1.10.0)
11
11
  minitest (5.11.3)
12
12
  rake (12.3.2)
13
13
  yard (0.9.16)
@@ -104,7 +104,7 @@ module Secp256k1
104
104
 
105
105
  msg32 = hash32 msg, raw, digest
106
106
 
107
- !!C.secp256k1_ecdsa_verify(@ctx, raw_sig, msg32, @public_key)
107
+ C.secp256k1_ecdsa_verify(@ctx, raw_sig, msg32, @public_key) == 1
108
108
  end
109
109
 
110
110
  def ecdh(scalar)
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : ascii-8bit -*-
2
2
  module Secp256k1
3
- VERSION = '0.5.0'
3
+ VERSION = '0.5.1'
4
4
  end
@@ -37,6 +37,13 @@ class Secp256k1Test < Minitest::Test
37
37
  end
38
38
  end
39
39
 
40
+ def test_ecdsa_verity
41
+ pk = PrivateKey.new
42
+ raw_sig = pk.ecdsa_sign 'test'
43
+ assert pk.pubkey.ecdsa_verify('test', raw_sig)
44
+ assert !pk.pubkey.ecdsa_verify('testtest', raw_sig)
45
+ end
46
+
40
47
  def test_ecdsa_compact
41
48
  pk = PrivateKey.new
42
49
  raw_sig = pk.ecdsa_sign 'test'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bitcoin-secp256k1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Xie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-28 00:00:00.000000000 Z
11
+ date: 2019-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi