xml-kit 0.1.8 → 0.1.9

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: 99b69beb8838a1d4df81f5f634041e58ac6552e7564f9ef644fd3658b3c05c1e
4
- data.tar.gz: f324dba7ceda0c3c5a4802c990baa1e56c8e502e47131459b60dc13247d3d578
3
+ metadata.gz: fe677a736a2c2c4fa559c731f391757bfb0052cffb692f5febb47822f972ae43
4
+ data.tar.gz: a280e8d5ae60c09b2e2413fc740a826d3495a65dc4327c1d2c8356f711e7dbc7
5
5
  SHA512:
6
- metadata.gz: 7a5a0e12f0042f17f367f8e51725013d28db9db0efdf3280dd59d812604fa93ba567fcf6973058ef0a04c9f2bf22517649be27e58bad0e098a9bfc26fdc35073
7
- data.tar.gz: 047cc7d2cc323ba170028a767120e89085f1397e72843b7b4035cef26c54a01cb816a5fc48f3d37d030c36afcd9e5e379e4280d573079ca238ce249a374ede2d
6
+ metadata.gz: d5ba0648633a8a0b343d80dd6e5606892af4db68b348ec160f9b39c3ad534cf40584550166be12de1a46057a077ce140ebf92918fd4f8521da8e42d63b515e2a
7
+ data.tar.gz: 02311fcd7751e056693b863153e0f81d24db99681ba7a0eef342d5dafef0873c4818cedf5e9ad7022688cc450844909c920c2e9fc0fd36c9bc2d033626f2027c
@@ -40,10 +40,7 @@ module Xml
40
40
  def decrypt_node(node)
41
41
  return node unless !node.nil? && "EncryptedData" == node.name
42
42
 
43
- parent = node.parent
44
- grand_parent = parent.parent
45
- parent.swap(decrypt_xml(node.to_s))
46
- grand_parent
43
+ node.parent.replace(decrypt_xml(node.to_s))[0]
47
44
  end
48
45
 
49
46
  private
@@ -13,10 +13,10 @@ module Xml
13
13
  asymmetric_algorithm: ::Xml::Kit::Crypto::RsaCipher::ALGORITHM
14
14
  )
15
15
  @symmetric_algorithm = symmetric_algorithm
16
- @symmetric_cipher_value = Base64.encode64(symmetric_cipher.encrypt(raw_xml))
16
+ @symmetric_cipher_value = Base64.encode64(symmetric_cipher.encrypt(raw_xml)).gsub(/\n/, '')
17
17
 
18
18
  @asymmetric_algorithm = asymmetric_algorithm
19
- @asymmetric_cipher_value = Base64.encode64(public_key.public_encrypt(symmetric_cipher.key))
19
+ @asymmetric_cipher_value = Base64.encode64(public_key.public_encrypt(symmetric_cipher.key)).gsub(/\n/, '')
20
20
  end
21
21
 
22
22
  def to_xml(xml: ::Builder::XmlMarkup.new)
@@ -1,5 +1,5 @@
1
1
  module Xml
2
2
  module Kit
3
- VERSION = "0.1.8"
3
+ VERSION = "0.1.9"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xml-kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - mo khan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-02-15 00:00:00.000000000 Z
11
+ date: 2018-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel