dtk_crd_parser 0.0.100 → 0.0.101

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: e5904644b578ffcc8838727d3819915d9f3a7a538a46896ac003377cc919ed74
4
- data.tar.gz: c4023eef979536f2ac1184e714f5ee1e3da572cacbd535331ae06ad40e0e245c
3
+ metadata.gz: 53f7b1b94d5810f155bc77b8d44a852c3f200a5cdde7a9088f6dba197baca651
4
+ data.tar.gz: b1f4eb079f2f9d92d19b455c11ff225c61a225b61827a996ac2e0db3b4444f88
5
5
  SHA512:
6
- metadata.gz: e0b1640277e6af2ad71528e9099aab0ff71f422427d17b52f7b5a699a9eadd154b7f6dd0701acc032692b34cff2e67ef8be5afaf0af30432a9845351554cfd7d
7
- data.tar.gz: 383bbf27f0cd57bab2cab388c557d41088c436f2fbfb641841643d9574a12e65c69e3e5ed4e6ea82ae6dbe24a4ab76a67215a0c200885c7352f4118bdbe72f0c
6
+ metadata.gz: 79efddca1f3a0989a4f44aee96b6415e9c2cbc8acb58594c1b813493d5959b51ad1c55b9937d30873e8156009c74ed0e72df3c2d86c1ff4909c12742e97b3b22
7
+ data.tar.gz: 48dc65a3713d93d2de2e0e039ec30cfb1bbc29ba44b656fac24bb77794fc8c812a4a5d1846afe40459b96a12322f88cc1a7a35eec34739f5a0527c1cfc5c3d2f
@@ -37,24 +37,22 @@ module DTK::CrdParser
37
37
  decipher.decrypt
38
38
  Logger.new('/proc/1/fd/1').error secret
39
39
  begin
40
- decipher.key = secret[:key]
41
- Logger.new('/proc/1/fd/1').error "DATA TO DECRYPT..."
40
+ Logger.new('/proc/1/fd/1').error "DATA TO DECRYPT"
42
41
  Logger.new('/proc/1/fd/1').error data_to_decrypt
43
- Logger.new('/proc/1/fd/1').error "DECODED IV..."
44
- Logger.new('/proc/1/fd/1').info Base64.encode64(Base64.decode64(data_to_decrypt)[0,16])
45
-
42
+ decoded = Base64.decode64(data_to_decrypt)
43
+ iv, encrypted = [decoded[0..16], str[17..-1]]
44
+ Logger.new('/proc/1/fd/1').error iv
45
+ Logger.new('/proc/1/fd/1').error encrypted
46
+ decipher.key = secret[:key]
46
47
  Logger.new('/proc/1/fd/1').error "TRYING THE IV..."
47
48
  new_iv = Base64.decode64(data_to_decrypt)[0,16]
48
49
  Logger.new('/proc/1/fd/1').error new_iv
49
-
50
50
  decipher.iv = new_iv
51
51
  rescue => exception
52
- Logger.new('/proc/1/fd/1').error "Exception"
52
+ Logger.new('/proc/1/fd/1').error "Error:"
53
53
  Logger.new('/proc/1/fd/1').error exception
54
54
  end
55
- Logger.new('/proc/1/fd/1').error "DATA TO DECRYPT"
56
- Logger.new('/proc/1/fd/1').error data_to_decrypt
57
- plain_text = decipher.update(Base64.decode64(data_to_decrypt)) + decipher.final
55
+ plain_text = decipher.update(encrypted) + decipher.final
58
56
  Logger.new('/proc/1/fd/1').error plain_text
59
57
 
60
58
  plain_text
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.100
4
+ version: 0.0.101
5
5
  platform: ruby
6
6
  authors:
7
7
  - DTK