How to encrypt an xml file?

  • Thread starter Thread starter Ilyas
  • Start date Start date
I

Ilyas

Hi all

Does anyone know how I can encrypt an xml file, so that:

<root>
<allowAdminAccess>True<allowAdminAccess>
<allowDirectAccess>True</allowDirectAccess>
.....[more settings here]
</root>

becomes

<key>some encrypted value--</key>

Any pointers to where I should be looking?
 
Ilyas said:
Hi all

Does anyone know how I can encrypt an xml file, so that:

<root>
<allowAdminAccess>True<allowAdminAccess>
<allowDirectAccess>True</allowDirectAccess>
....[more settings here]
</root>

becomes

<key>some encrypted value--</key>

Any pointers to where I should be looking?

Have a look at the following classes

http://msdn.microsoft.com/en-us/library/system.security.cryptography.xml.signedxml.aspx
SignedXml
System.Security.dll

(used to verify the authenticity of the XML file (to show that it
has not been altered)

and:

http://msdn.microsoft.com/en-us/library/system.security.cryptography.xml.encryptedxml.aspx
EncryptedXml
System.Security.dll

--

Note that System.Security.dll is not referenced byu default in a new Visual
Studio project.

Steven
 
Back
Top