Commit 766b753

mo <mo.khan@gmail.com>
2017-12-28 17:56:05
extract EncryptedAssertion class.
1 parent 930d720
Changed files (1)
lib
xml
kit
builders
lib/xml/kit/builders/templates/xml_encryption.builder
@@ -1,16 +1,14 @@
-xml.EncryptedAssertion xmlns: Saml::Kit::Namespaces::ASSERTION do
-  xml.EncryptedData xmlns: ::Xml::Kit::Namespaces::XMLENC do
-    xml.EncryptionMethod Algorithm: "http://www.w3.org/2001/04/xmlenc#aes256-cbc"
-    xml.KeyInfo xmlns: ::Xml::Kit::Namespaces::XMLDSIG do
-      xml.EncryptedKey xmlns: ::Xml::Kit::Namespaces::XMLENC do
-        xml.EncryptionMethod Algorithm: "http://www.w3.org/2001/04/xmlenc#rsa-1_5"
-        xml.CipherData do
-          xml.CipherValue Base64.encode64(public_key.public_encrypt(key))
-        end
+xml.EncryptedData xmlns: ::Xml::Kit::Namespaces::XMLENC do
+  xml.EncryptionMethod Algorithm: "http://www.w3.org/2001/04/xmlenc#aes256-cbc"
+  xml.KeyInfo xmlns: ::Xml::Kit::Namespaces::XMLDSIG do
+    xml.EncryptedKey xmlns: ::Xml::Kit::Namespaces::XMLENC do
+      xml.EncryptionMethod Algorithm: "http://www.w3.org/2001/04/xmlenc#rsa-1_5"
+      xml.CipherData do
+        xml.CipherValue Base64.encode64(public_key.public_encrypt(key))
       end
     end
-    xml.CipherData do
-      xml.CipherValue Base64.encode64(iv + encrypted)
-    end
+  end
+  xml.CipherData do
+    xml.CipherValue Base64.encode64(iv + encrypted)
   end
 end