dtk_crd_parser 0.0.103 → 0.0.104
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 +6 -13
- 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: 36e168d1d9819c6130289f60a578e7cb4cac4e3558d13bf0596261b25e503af8
|
4
|
+
data.tar.gz: 00abb6d0f520fb43aa4a19ea8608630364dea57579629da5191876c50080c7de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 783adab26d4cd1eb73bc9765a12767521a1a0e753b52132bfdaced3673ad6013161eb7f7de6ce342011992ba5c0e160d071bb0b5b9a638adad5aef5093ac1b86
|
7
|
+
data.tar.gz: c8d3a1087e98cdebf7e329d078fcb75fe2887c9eec5d3871ae87fe6adecf04fef6bd7d46063f28d7240bbf3204978fdd06f40ba5f506dca6b58f2773b67b5db6
|
@@ -35,27 +35,20 @@ module DTK::CrdParser
|
|
35
35
|
secret = secret()
|
36
36
|
decipher = OpenSSL::Cipher::AES256.new :CBC
|
37
37
|
decipher.decrypt
|
38
|
-
Logger.new('/proc/1/fd/1').error secret
|
39
38
|
begin
|
40
|
-
Logger.new('/proc/1/fd/1').error "DATA TO DECRYPT"
|
41
|
-
Logger.new('/proc/1/fd/1').error data_to_decrypt
|
42
39
|
decoded = Base64.decode64(data_to_decrypt)
|
43
|
-
iv, encrypted = [decoded[0
|
40
|
+
iv, encrypted = [decoded[0,16], decoded[16..-1]]
|
44
41
|
Logger.new('/proc/1/fd/1').error Base64.encode64(iv)
|
45
42
|
Logger.new('/proc/1/fd/1').error Base64.encode64(encrypted)
|
46
43
|
decipher.key = secret[:key]
|
47
|
-
|
48
|
-
|
49
|
-
Logger.new('/proc/1/fd/1').error
|
50
|
-
|
44
|
+
decipher.iv = iv
|
45
|
+
plain_text = decipher.update(encrypted) + decipher.final
|
46
|
+
Logger.new('/proc/1/fd/1').error plain_text
|
47
|
+
plain_text
|
51
48
|
rescue => exception
|
52
|
-
Logger.new('/proc/1/fd/1').error "Error:"
|
49
|
+
Logger.new('/proc/1/fd/1').error "Error in decrypt:"
|
53
50
|
Logger.new('/proc/1/fd/1').error exception
|
54
51
|
end
|
55
|
-
plain_text = decipher.update(encrypted) + decipher.final
|
56
|
-
Logger.new('/proc/1/fd/1').error plain_text
|
57
|
-
|
58
|
-
plain_text
|
59
52
|
end
|
60
53
|
|
61
54
|
def secret
|