Encrypting a local user credentials file
I am writing a configuration tool that accesses different databases and it has two different views. One for the admins that have rights to see and edit the connection strings, and one for the employees that don't. The login data is stored in a local xml file and the whole file needs to be encrypted. The problem I am having is that I don't know how to safely hide the key inside the application. How do I make it so that the application can access the file to check user credentials without exposing the key inside of the executable?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

David4 reputationPosted May 28, 2009, 12:27 PM EDT
Make sure you include
using System.Security.Cryptography;
How to encrypt
Make two text boxes and rename them, 'txtEncryptInput' and 'txtEncryptOutput'
Make a button and add this:
How to decrypt
Make two text boxes and rename them, 'txtDecryptInput' and 'txtDecryptOutput'
Make a button and add this:
If you have any questions please ask ;)
John7 reputationPosted May 28, 2009, 1:11 PM EDT