dgnatek
asked on
How do I creating and read encrypted XML files with VB.Net?
Hey all,
I am having a bit of trouble figuring out how to write out and read back some encrytped XML files using VB.Net 2005 and could use some help.
What I am trying to do is two fold:
-One: Save the contents of a loaded XMLDocument object as an encrypted XML file (the type of encryption does not matter; however, speed of decryption will be important down the road.
-Two: Read the contents of the encrypted file back into an XMLDocument object which I can then run some Xpath statements against.
The key would be known by both the program doing the encryption as well as the program doing the decryption.
Seems straight-forward. I have found a lot of great XML/encryption/decryption examples but nothing that quite fits. Your help is appreciated.
I am having a bit of trouble figuring out how to write out and read back some encrytped XML files using VB.Net 2005 and could use some help.
What I am trying to do is two fold:
-One: Save the contents of a loaded XMLDocument object as an encrypted XML file (the type of encryption does not matter; however, speed of decryption will be important down the road.
-Two: Read the contents of the encrypted file back into an XMLDocument object which I can then run some Xpath statements against.
The key would be known by both the program doing the encryption as well as the program doing the decryption.
Seems straight-forward. I have found a lot of great XML/encryption/decryption examples but nothing that quite fits. Your help is appreciated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
As a followup to the above comment, it is necessary to add a reference to Sytem.Security.dll in your project properties before references to System.Security.Cryptograp hy.Xml are valid. Just adding an Imports statement was/is not enough.
ASKER
I was really hoping for a VB.Net based solution (example). However, I was able to decode the C# stuff. Thanks.
ASKER
Open in new window