verizon_token 0.2.2 → 0.2.3

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: f9168b22c38f4881955037e69ede0c2c8d35eacdfe37d9c2df7bee15206f46c6
4
- data.tar.gz: e58a2b9718290c1b89e8e9701c18b691bc1c682f2659a0ee02ac2a805b63b229
3
+ metadata.gz: 17f625c02b17917ece5d84ca43741b4fa4ede5188f5a19685f8aa4e57b4e8d5b
4
+ data.tar.gz: 207d432905d16935b8e58826b309897003f833d3027abe6cd59e6b9404fd1cae
5
5
  SHA512:
6
- metadata.gz: 8a94801e3b2aa5fb55d52b3fa4f50c9cb03023135f57ae6723e6e16665ba93103c0935d090b36dfe9e73bfe5212a6b6a62d5f34c28dce5e921bdc35ab0cd6875
7
- data.tar.gz: babb7c582abf121ab7ca80b04b15c4fb58c646d83664ca370b808654b955d2cdcb4bf5f141716bde3d8977e77e00ae217118bbb387825246c13f405d0eec2d52
6
+ metadata.gz: 99e60a7d16aee646590b35c3018599b1b3c760f44b7c54893fc2ffed1cc81d19060449992595a9492da9e2339c6a7b74bb22f41a52a82396a004e50ebd58d754
7
+ data.tar.gz: 2fc0fdfdd624f3e7d0c2bafb6386f6a938a5cc28f2ea469528e49b549855b1e2e3f74251c885357856273abc0e9e497d4ebe4ed7e9fa16be6684901c77b35711
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- verizon_token (0.2.2)
4
+ verizon_token (0.2.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -8,7 +8,7 @@ Encryptor/decryptor for Verizon's ectoken
8
8
  Add this line to your application's Gemfile:
9
9
 
10
10
  ```
11
- gem 'ectoken'
11
+ gem 'verizon_token'
12
12
  ```
13
13
 
14
14
  And then execute:
@@ -63,4 +63,4 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
63
63
 
64
64
  ## Contributing
65
65
 
66
- Bug reports and pull requests are welcome on GitHub at https://github.com/mauricioabreu/ectoken-ruby
66
+ Bug reports and pull requests are welcome on GitHub at https://github.com/globocom/ectoken-ruby
@@ -10,15 +10,15 @@ Gem::Specification.new do |spec|
10
10
 
11
11
  spec.summary = %q{Encryptor/decryptor for Verizon's edge cast token}
12
12
  spec.description = %q{Encryptor/decryptor for Verizon's edge cast token}
13
- spec.homepage = "https://github.com/mauricioabreu/ectoken-ruby"
13
+ spec.homepage = "https://github.com/globocom/ectoken-ruby"
14
14
  spec.license = "Apache License 2.0"
15
15
 
16
16
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
17
17
  # to allow pushing to a single host or delete this section to allow pushing to any host.
18
18
  if spec.respond_to?(:metadata)
19
19
  spec.metadata["homepage_uri"] = spec.homepage
20
- spec.metadata["source_code_uri"] = "https://github.com/mauricioabreu/ectoken-ruby"
21
- spec.metadata["changelog_uri"] = "https://github.com/mauricioabreu/ectoken-ruby"
20
+ spec.metadata["source_code_uri"] = "https://github.com/globocom/ectoken-ruby"
21
+ spec.metadata["changelog_uri"] = "https://github.com/globocom/ectoken-ruby"
22
22
  else
23
23
  raise "RubyGems 2.0 or newer is required to protect against " \
24
24
  "public gem pushes."
@@ -5,7 +5,7 @@ require 'optparse'
5
5
 
6
6
  module EdgeCastToken
7
7
  class Token
8
- def self.encrypt(key, token)
8
+ def self.encrypt(key, token, padding = true)
9
9
  digest = Digest::SHA256.digest(key)
10
10
  cipher = OpenSSL::Cipher.new('aes-256-gcm').encrypt
11
11
  iv = cipher.random_iv
@@ -13,7 +13,7 @@ module EdgeCastToken
13
13
  cipher.key = digest
14
14
  cipher_text = cipher.update(token) + cipher.final
15
15
  cipher_with_iv = iv + cipher_text + cipher.auth_tag
16
- Base64.urlsafe_encode64(cipher_with_iv)
16
+ Base64.urlsafe_encode64(cipher_with_iv, padding: padding)
17
17
  end
18
18
 
19
19
  def self.decrypt(key, token)
@@ -1,3 +1,3 @@
1
1
  module EdgeCastToken
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: verizon_token
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maurício de Abreu Antunes
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-26 00:00:00.000000000 Z
11
+ date: 2020-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -75,13 +75,13 @@ files:
75
75
  - lib/ectoken/cli.rb
76
76
  - lib/ectoken/ectoken.rb
77
77
  - lib/ectoken/version.rb
78
- homepage: https://github.com/mauricioabreu/ectoken-ruby
78
+ homepage: https://github.com/globocom/ectoken-ruby
79
79
  licenses:
80
80
  - Apache License 2.0
81
81
  metadata:
82
- homepage_uri: https://github.com/mauricioabreu/ectoken-ruby
83
- source_code_uri: https://github.com/mauricioabreu/ectoken-ruby
84
- changelog_uri: https://github.com/mauricioabreu/ectoken-ruby
82
+ homepage_uri: https://github.com/globocom/ectoken-ruby
83
+ source_code_uri: https://github.com/globocom/ectoken-ruby
84
+ changelog_uri: https://github.com/globocom/ectoken-ruby
85
85
  post_install_message:
86
86
  rdoc_options: []
87
87
  require_paths: