Storing passwords in web.config

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?
 
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.
 
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.

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. :)
 
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.

Although it's not safe from people who might get on the webserver its self. If that happens to be a malicious person then your database could be in trouble.
 
More to the point MD5 is worthless.
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. Salting :)

But yes, something like SHA256 is more "secure" :)
 
Back
Top Bottom