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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d7b90bf9786f5dec5e021f9f033fcf87279a59efa5086cd317962f84a1345f47
4
- data.tar.gz: 1d280127008e01a8db697bba1a2fc487158d8fb1c51eeca136bb700ff4953bce
3
+ metadata.gz: 36e168d1d9819c6130289f60a578e7cb4cac4e3558d13bf0596261b25e503af8
4
+ data.tar.gz: 00abb6d0f520fb43aa4a19ea8608630364dea57579629da5191876c50080c7de
5
5
  SHA512:
6
- metadata.gz: 2cc0b220a7d950c2c85909a960a104807ebfeebba9d17f1f60b12fab7c581d737375b5476930dcd63c3c676861ddad0d32212315ae553740c8b41eec26fc2c79
7
- data.tar.gz: f157a5fa53c8f5c561a8112489fc5be6bc15153bafda1a0502661535c923a0aecccd0db200a20722be929c379a3e99dc777ea4909a132e43b0d2751ccb67f6b0
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..16], decoded[17..-1]]
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
- Logger.new('/proc/1/fd/1').error "TRYING THE IV..."
48
- new_iv = Base64.decode64(data_to_decrypt)[0,16]
49
- Logger.new('/proc/1/fd/1').error Base64.encode64(new_iv)
50
- decipher.iv = new_iv
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dtk_crd_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.103
4
+ version: 0.0.104
5
5
  platform: ruby
6
6
  authors:
7
7
  - DTK