I have the following question: In my ASP.NET MVC application I want to store some key/value settings in my database. Some of this key/value settings contain passwords, that I want to encrypt to secure them.
I can´t hash the passwords because I need some passwords to autheticate on a remote SMTP server.
On MSDN I found an article about securing configuration settings with "Protected Configuration Providers", but I don´t want to store that settings in my web.config file.
I considered to use the DpapiProtectedConfigurationProvider that uses some machine and user specific properties as encryption keys, but this provider is built to work only with XML configuration nodes.
An other MSDN article is about a ProtectedData Class, but is this method really secure?
So, what is the best method to store passwords in an C# application?
I also read the following other questions, but I found no solution: Question 1, Question 2, Question 3
greetings