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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 22b70b4ef4e0b030632a418609e96ff5f84002c57c2ab03f0b8dfa96c2269079
4
- data.tar.gz: 27e4c5183a0ddd41131a00ba8ef76ceab4a335c13047a8285ad4c11f3855cd82
3
+ metadata.gz: c2a014f3ebb8cff1ea886c21bc99ab4f19381f20f38cfd5584611818bd2ad81d
4
+ data.tar.gz: fb02ef43dd20119b8ce2f7da257db1bf8f074561af9dffca697e7e280451d02e
5
5
  SHA512:
6
- metadata.gz: cd20625b4eaecd91a65127d140d5fb746076ae15b064dac3a27d88f5802049f14129543ef810a166838ba71352ade6cb58b051abb4a6e6b17565d8cc0cd03d60
7
- data.tar.gz: 3bfc34738682cab00664f8264e0a9f19118964b7ce4b218e47c14a507f4152711178425caf7235a9a5d869bda59badfd2fbb4f2b6ff6c5cf17795fb095fa79f3
6
+ metadata.gz: '06439e4c8012412f3ce9fc0945eb6d6603f825ec442701b3d9203f8ff17d7fb264b9bea9dafda23e3253d5b6577f65bd884f5d695306e04f36ffc56e6cc3af37'
7
+ data.tar.gz: 3575e0c4c57153ac2c4b531f93f344daaa105478b16787929e68d3c8bae1ca5a1f09478be1ee95b90789b004943f76f5f0e289322da63602147f3fe415322214
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- credify (0.1.0)
4
+ credify (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
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 "UseZb/HIOiqrYSLqVmMdbiILuLTdiGRA3hZ3QwiEiBU="
38
+ signing.import_seed "-o7hvhS1dJpYanm7fysJdi7j8t1tpKTuUPjou1FS7jg"
39
39
  signature = signing.sign "message"
40
40
  valid = signing.verify "message", signature
41
41
  puts valid
@@ -17,10 +17,11 @@ class Signing
17
17
 
18
18
  #
19
19
  # import_seed
20
- # @param [String] seed - Base64 encoded 32 byte seed data
20
+ # @param [String] seed - Base64 URL encoded seed data
21
21
  # @return [Boolean]
22
22
  def import_seed(seed)
23
- @signing_key = Ed25519::SigningKey.new(Base64.decode64(seed))
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 32 bytes seed data
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
- Base64.encode64(@signing_key.seed)
60
+ Credify::Helpers.short_urlsafe_encode64(@signing_key.seed)
60
61
  end
61
62
 
62
63
  #
@@ -1,3 +1,3 @@
1
1
  module Credify
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
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.2.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-05 00:00:00.000000000 Z
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: