I understand that an embedded password is not very secure in a C# program, but I would like to provide one for users that don’t want to enter a master password every time they launch my application. This password would be used to encrypt sensitive data that is written to XML files on the hard disk such as login details.
I want to avoid having the same default password embedded into every install of the software.
So they download my software application, and after installing it, they get a password generated for them that is embedded within the application. This should not be stored in a file on their computer except for being embedded within the application to try to hide it.
Looking forward to your suggested solutions …
You should instead use the
ProtectedDataclass to encrypt your data.It encrypts data using a user-specific encryption key. It does not require a password at all, but is instead bound to the currently logged in windows account.