aliquot-pay 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/aliquot-pay.rb +7 -2
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 35dfff1ebd40162ee529331539e3e84c3cd9d4584aa8c5cbcd512ad4f1bddbcd
4
- data.tar.gz: 06405dd759121d55be37e9488f0a21b50bf710613b5d00cc9d91cbdd6bc1a6a7
3
+ metadata.gz: bd781c1bcf3c08449d83bdd303af4e9ea5f626edf34ef36d693e59c5046bd76d
4
+ data.tar.gz: 14b8f7ca9f162cf03ff041f4a441e530b7847a13fbdc5d09de19cd3ccc8eb941
5
5
  SHA512:
6
- metadata.gz: eab0cb24c340f738da984ec910f134836cd04deee6baca6ee2946e9fdcedc0253f8aba93c71e3c9f98b36f086ae7b003fb1a3eeb5964f9a67a1b189cede7132c
7
- data.tar.gz: 8ec410a4184ba33fd932694d77ac37978e2da7af1851c5a97ff6640aad82a8690a14114e48607cd3df1dfdbb5a71ea0525a588895574cbfe1b6dbfcf34611999
6
+ metadata.gz: be990eb9f8bce95b200b8c9be5fa88ec3fb24aaa8f91be448a76e0758f04a7717679bde3447c3a82fb42a63b1a7b257ba8a3d06ec296df9b685154f1b0233579
7
+ data.tar.gz: c635f9118731166e62d49ba5cedff290f78e28233303e92a07d562002a3b91c57e882e151ac46724da142ac5506452c71dcdd81e5eeef2da710d950fe82fe30b
data/lib/aliquot-pay.rb CHANGED
@@ -25,8 +25,11 @@ class AliquotPay
25
25
  attr_accessor :recipient, :info, :root_key, :intermediate_key
26
26
  attr_writer :recipient_id, :shared_secret, :token, :signed_key_string
27
27
 
28
- def initialize(protocol_version = :ECv2)
28
+ def initialize(protocol_version = :ECv2, root_key = nil)
29
29
  @protocol_version = protocol_version
30
+ if root_key
31
+ @root_key = root_key
32
+ end
30
33
  end
31
34
 
32
35
  def token
@@ -45,7 +48,9 @@ class AliquotPay
45
48
 
46
49
  def sign(key, message)
47
50
  d = OpenSSL::Digest::SHA256.new
48
- def key.private?; private_key?; end
51
+ def key.private?
52
+ private_key?
53
+ end
49
54
  Base64.strict_encode64(key.sign(d, message))
50
55
  end
51
56
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aliquot-pay
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Clearhaus
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-05 00:00:00.000000000 Z
11
+ date: 2023-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hkdf
@@ -79,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
79
  - !ruby/object:Gem::Version
80
80
  version: '0'
81
81
  requirements: []
82
- rubygems_version: 3.1.6
82
+ rubygems_version: 3.3.26
83
83
  signing_key:
84
84
  specification_version: 4
85
85
  summary: Generates Google Pay test dummy tokens