This project has moved and is read-only. For the latest updates, please go here.


The EncryptedXmlExtension methods type provides several extension methods for the System.Security.Cryptography.Xml.EncryptedXml class. This type is in the Security.Cryptography.Xml namespace (not the System.Security.Cryptography.Xml namespace), so in order to use these extension methods, you will need to make sure you include this namespace as well as a reference to Security.Cryptography.dll.


void ReplaceData2(System.Xml.XmlElement inputElement, System.Byte[] decryptedData)

Replace the XML element with the decrypted data. This method works very much like the standard System.Security.Cryptography.Xml.EncryptedXml.ReplaceData(System.Xml.XmlElement,System.Byte(array)) API, with one exception. If inputElement is the root element of an XML document, ReplaceData2 will ensure that any other top-level XML items (such as the XML declaration) will not be overwritten, whereas ReplaceData always overwrites the entire XML document with the decrypted data.

Last edited Jun 4, 2009 at 1:52 AM by shawnfa, version 2


No comments yet.