dtk_crd_parser 0.0.84 → 0.0.85
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/crd_parser/base_class/helper_mixins.rb +4 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 677e549e3c7e076f473d220e501807bae625ad4c4c51695770d8f5ba3fd0b1db
|
4
|
+
data.tar.gz: 917abdc1be28d10fb6700d90047de6e3ea0891c883c76fe9c476c7b4c03b9268
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8cecf296592bc4e16a1d8130281a185a6382ec3334cab234221cf6a62c5e92e863678b88beec3e55dae91726cfcba98d8924251ff636bea0bddc3f617c01eefa
|
7
|
+
data.tar.gz: 1c054fc7c996d6d3f670772068461a2b8b76dc1efa153395e721020796b733443e6feb0e78655cfb782697df67fbe418c00c86e2b0f3fa11f52d50a7b5721269
|
@@ -31,20 +31,18 @@ module DTK::CrdParser
|
|
31
31
|
return nil unless data_to_decrypt
|
32
32
|
return data_to_decrypt unless encrypted
|
33
33
|
#get secret to get the key and iv
|
34
|
-
|
34
|
+
secret = secret()
|
35
35
|
decipher = OpenSSL::Cipher::AES256.new :CBC
|
36
36
|
decipher.decrypt
|
37
|
-
secret = secret()
|
38
37
|
decipher.iv = secret[:iv]
|
39
38
|
decipher.key = secret[:key]
|
40
39
|
plain_text = decipher.update(Base64.decode64(data_to_decrypt)) + decipher.final
|
41
|
-
Logger.new('/proc/1/fd/1').info "Plaintext: #{plain_text}"
|
42
40
|
plain_text
|
43
41
|
end
|
44
42
|
|
45
|
-
def secret
|
46
|
-
encrypt_key =
|
47
|
-
iv =
|
43
|
+
def secret
|
44
|
+
encrypt_key = ENV["ENCRYPTION_KEY"]
|
45
|
+
iv = ENV["ENCRYPTION_IV"]
|
48
46
|
{
|
49
47
|
key: encrypt_key,
|
50
48
|
iv: iv
|