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.
- checksums.yaml +4 -4
- data/lib/aliquot-pay.rb +7 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd781c1bcf3c08449d83bdd303af4e9ea5f626edf34ef36d693e59c5046bd76d
|
4
|
+
data.tar.gz: 14b8f7ca9f162cf03ff041f4a441e530b7847a13fbdc5d09de19cd3ccc8eb941
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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.
|
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-
|
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.
|
82
|
+
rubygems_version: 3.3.26
|
83
83
|
signing_key:
|
84
84
|
specification_version: 4
|
85
85
|
summary: Generates Google Pay test dummy tokens
|