I want to store a password in a config file but i would like it to be encrypted so that in the app it can be read, decrypted and used. What's the best way to encrypt a password like this?
Edit: I want to encrypt only password, not whole config, or whole section.
views:
1055answers:
2but this works only on my computer! i mean: if i encrypt the password on my computer, the other user that gets the app installed is not able to decrypt the password and therefore to use my application
agnieszka
2009-09-10 21:56:01
+2
A:
You can use DpapiProtectedConfigurationProvider
See this links .
Encrypting .NET configuration files through code
Implementing Protected Configuration With Windows Apps
Encrypting Passwords in a .NET app.config File
Bye.
RRUZ
2009-09-08 09:27:41