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 +4 -4
- data/lib/xml/kit/decryption.rb +1 -4
- data/lib/xml/kit/encryption.rb +2 -2
- data/lib/xml/kit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe677a736a2c2c4fa559c731f391757bfb0052cffb692f5febb47822f972ae43
|
4
|
+
data.tar.gz: a280e8d5ae60c09b2e2413fc740a826d3495a65dc4327c1d2c8356f711e7dbc7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5ba0648633a8a0b343d80dd6e5606892af4db68b348ec160f9b39c3ad534cf40584550166be12de1a46057a077ce140ebf92918fd4f8521da8e42d63b515e2a
|
7
|
+
data.tar.gz: 02311fcd7751e056693b863153e0f81d24db99681ba7a0eef342d5dafef0873c4818cedf5e9ad7022688cc450844909c920c2e9fc0fd36c9bc2d033626f2027c
|
data/lib/xml/kit/decryption.rb
CHANGED
@@ -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
|
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
|
data/lib/xml/kit/encryption.rb
CHANGED
@@ -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)
|
data/lib/xml/kit/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2018-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|