Encrypt WHOLE xml file - C#
How to encrypt 开发者_StackOverflowWHOLE an xml file using C#?
If I understand you question, you might start by looking at System.Security.Cryptography namespace in .Net, and in particular at the CryptoStream class.
Here's a link you might find useful:
Encrypt and decrypt a string
If you mean how to encrypt the XML file within code and save it back to disk, you can read the XML file as simple text. In that form it is nothing but a long string. Use the method you are familiar with to encrypt it. Then save it back to disk as a standard binary file. Reverse that to decrypt the file.
If you just want to encrypt the file on the drive, in Windows you can do that from the file properties.
精彩评论