lib/xml/kit/decryption.rb in xml-kit-0.1.8 vs lib/xml/kit/decryption.rb in xml-kit-0.1.9

- old
+ new

@@ -38,13 +38,10 @@ # # @param node [Nokogiri::XML::Element.] the XML node to decrypt. def decrypt_node(node) return node unless !node.nil? && "EncryptedData" == node.name - parent = node.parent - grand_parent = parent.parent - parent.swap(decrypt_xml(node.to_s)) - grand_parent + node.parent.replace(decrypt_xml(node.to_s))[0] end private def symmetric_key_from(encrypted_data)