How to encrypt an xml file?

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?
 
S

Steven Wilmot

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top