credify 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/credify/signing.rb +5 -4
- data/lib/credify/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c2a014f3ebb8cff1ea886c21bc99ab4f19381f20f38cfd5584611818bd2ad81d
|
|
4
|
+
data.tar.gz: fb02ef43dd20119b8ce2f7da257db1bf8f074561af9dffca697e7e280451d02e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '06439e4c8012412f3ce9fc0945eb6d6603f825ec442701b3d9203f8ff17d7fb264b9bea9dafda23e3253d5b6577f65bd884f5d695306e04f36ffc56e6cc3af37'
|
|
7
|
+
data.tar.gz: 3575e0c4c57153ac2c4b531f93f344daaa105478b16787929e68d3c8bae1ca5a1f09478be1ee95b90789b004943f76f5f0e289322da63602147f3fe415322214
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -35,7 +35,7 @@ end
|
|
|
35
35
|
|
|
36
36
|
def existing_key_is_used
|
|
37
37
|
signing = Signing.new
|
|
38
|
-
signing.import_seed "
|
|
38
|
+
signing.import_seed "-o7hvhS1dJpYanm7fysJdi7j8t1tpKTuUPjou1FS7jg"
|
|
39
39
|
signature = signing.sign "message"
|
|
40
40
|
valid = signing.verify "message", signature
|
|
41
41
|
puts valid
|
data/lib/credify/signing.rb
CHANGED
|
@@ -17,10 +17,11 @@ class Signing
|
|
|
17
17
|
|
|
18
18
|
#
|
|
19
19
|
# import_seed
|
|
20
|
-
# @param [String] seed - Base64 encoded
|
|
20
|
+
# @param [String] seed - Base64 URL encoded seed data
|
|
21
21
|
# @return [Boolean]
|
|
22
22
|
def import_seed(seed)
|
|
23
|
-
|
|
23
|
+
binary = Credify::Helpers.short_urlsafe_decode64(seed)
|
|
24
|
+
@signing_key = Ed25519::SigningKey.new(binary)
|
|
24
25
|
@signing_key.nil?
|
|
25
26
|
end
|
|
26
27
|
|
|
@@ -51,12 +52,12 @@ class Signing
|
|
|
51
52
|
|
|
52
53
|
#
|
|
53
54
|
# export_seed
|
|
54
|
-
# @return [String] - Base64 encoded
|
|
55
|
+
# @return [String] - Base64 URL encoded seed data
|
|
55
56
|
def export_seed
|
|
56
57
|
if @signing_key.nil?
|
|
57
58
|
raise Exception.new 'Please pass signing key'
|
|
58
59
|
end
|
|
59
|
-
|
|
60
|
+
Credify::Helpers.short_urlsafe_encode64(@signing_key.seed)
|
|
60
61
|
end
|
|
61
62
|
|
|
62
63
|
#
|
data/lib/credify/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: credify
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- credify-pte-ltd
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-04-
|
|
11
|
+
date: 2021-04-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: This is a Ruby SDK to integrate with Credify system.
|
|
14
14
|
email:
|