so create a class to decrypt a password which is stored, for say an email account, but how do you do it for external entities such as databases?
I'd do it as a 1 way encryption using something like MD5. You encrypt their entered password against the one stored and if they don't match the password is wrong. If they request a new password, have the system generate one for them.
its not bad practice at all, its in the web.config and safe from all but developers and those with access to the web.config file (IT Ops etc)
personally i've rarely found any reason to do this though, so i would question your reason for doing this.
Being pedantic here.. MD5 et al. are not encryption algorithms, they are hashing algorithms. So to "MD5" some data is to hash some data, not encrypt.![]()
Not completely. Some consider it worthless due to its popularity with password hashing (and the resulting rainbow tables available), but there are plenty ways to increase the security of it. SaltingMore to the point MD5 is worthless.