verizon_token 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/ectoken/ectoken.rb +2 -2
- data/lib/ectoken/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: 2976dc9608eb8fb766379005f0ca8236754431d6d00583ba950e6e639c44185b
|
4
|
+
data.tar.gz: be1c3e4889d1b86107eac7d4f5570edbe61ef47b474312d705bff4e8d13119c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f8723c525ebc3ba50d53f45fea0798261904be4717f0333f0450ec91732df3c82b54143803f5e72b005b6d0a314481e7b3b6c7932552aeedf0b4e8e51e01d88
|
7
|
+
data.tar.gz: 7f94f3b1db7003689016a0789c2b1f283c630804dff92cad721609f40c3a91f07d2b8a31654e3169488b6ab793631e86ccd62736bcfd3be4d884a7366365a8b1
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
data/lib/ectoken/ectoken.rb
CHANGED
@@ -7,7 +7,7 @@ module EdgeCastToken
|
|
7
7
|
class Token
|
8
8
|
def self.encrypt(key, token)
|
9
9
|
digest = Digest::SHA256.digest(key)
|
10
|
-
cipher = OpenSSL::Cipher
|
10
|
+
cipher = OpenSSL::Cipher.new('aes-256-gcm').encrypt
|
11
11
|
iv = cipher.random_iv
|
12
12
|
cipher.iv = iv
|
13
13
|
cipher.key = digest
|
@@ -21,7 +21,7 @@ module EdgeCastToken
|
|
21
21
|
decoded_token = Base64.urlsafe_decode64(token)
|
22
22
|
iv = decoded_token[0..11]
|
23
23
|
decipher_text = decoded_token[12..decoded_token.length-17]
|
24
|
-
decipher = OpenSSL::Cipher
|
24
|
+
decipher = OpenSSL::Cipher.new('aes-256-gcm').decrypt
|
25
25
|
decipher.iv = iv
|
26
26
|
decipher.key = digest
|
27
27
|
decipher.update(decipher_text)
|
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.
|
4
|
+
version: 0.2.0
|
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-
|
11
|
+
date: 2020-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|