View Full Version : Encripting passwords in mysql
Andy92
05-08-2007, 10:29 PM
Hi there,
Is there any way to encript a password in a mysql database, so that if anyone looks in the database, they wont know peoples passwords?
oracleguy
05-08-2007, 11:44 PM
You can use a one way encryption algorithm like MD5 or SHA1. That way no one (including you) will know what users passwords are if they get the data from your db. These algorithms will give the same result multiple times if you provide the exact same input data.
So then when users login, you hash the password they entered and compare it to the hash on record. If they are the same then the user entered the correct password.
vBulletin® v3.8.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.