RE: [PHP-DB] Passwords
| From: | Bastien Koert | Date: | Thu, 09 Mar 2006 00:30:30 +0000 |
| Subject: | RE: [PHP-DB] Passwords | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-41415@lists.php.net to get a copy of this message | ||
I tend to use a hash value (like MD5) to one way encrypt it...
If you combine it with a salt value (some random string that is consistent in the app) then is reasonably secure from being hacked...ex.
$salt = '1234567890';
$pass = md5($salt.$_POST['password']);bastien
From: Benjamin Stambaugh <bmstamba@ycp.edu> To: "php-db@lists.php.net" <php-db@lists.php.net> Subject: [PHP-DB] Passwords Date: Wed, 08 Mar 2006 18:34:25 -0500 Hi, I have created a user login/registration page. As of now I am using a MySQL database to store the info of the user. To validate the user I also have the password stored in the same DB. I was wondering if there is a way that I can store the password in the DB so that it is encrypted or something. Just so it is not in plain text. Ben -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php