verizon_token 0.2.2 → 0.2.3
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 +2 -2
- data/ectoken.gemspec +3 -3
- data/lib/ectoken/ectoken.rb +2 -2
- data/lib/ectoken/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 17f625c02b17917ece5d84ca43741b4fa4ede5188f5a19685f8aa4e57b4e8d5b
|
|
4
|
+
data.tar.gz: 207d432905d16935b8e58826b309897003f833d3027abe6cd59e6b9404fd1cae
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 99e60a7d16aee646590b35c3018599b1b3c760f44b7c54893fc2ffed1cc81d19060449992595a9492da9e2339c6a7b74bb22f41a52a82396a004e50ebd58d754
|
|
7
|
+
data.tar.gz: 2fc0fdfdd624f3e7d0c2bafb6386f6a938a5cc28f2ea469528e49b549855b1e2e3f74251c885357856273abc0e9e497d4ebe4ed7e9fa16be6684901c77b35711
|
data/Gemfile.lock
CHANGED
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 '
|
|
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/
|
|
66
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/globocom/ectoken-ruby
|
data/ectoken.gemspec
CHANGED
|
@@ -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/
|
|
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/
|
|
21
|
-
spec.metadata["changelog_uri"] = "https://github.com/
|
|
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."
|
data/lib/ectoken/ectoken.rb
CHANGED
|
@@ -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)
|
data/lib/ectoken/version.rb
CHANGED
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.
|
|
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-
|
|
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/
|
|
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/
|
|
83
|
-
source_code_uri: https://github.com/
|
|
84
|
-
changelog_uri: https://github.com/
|
|
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:
|