note 87483 deleted from function.md5 by joey
| From: | joey@php.net | Date: | Sun, 17 Jul 2011 08:39:08 +0000 |
| Subject: | note 87483 deleted from function.md5 by joey | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-181602@lists.php.net to get a copy of this message | ||
Note Submitter: matrebatre
----
I don't think encrypting the passwords multiple times is a good idea. It will reduce the number
of possibilities. I think the best way to protect the passwords is by using two different salts, and
do something like this:
<?php
$hash = md5($salt1.$password.$salt2);
?>
Because of the way md5 hashes are calculated, it is also important to use salts that are NOT 64
characters, because MD5 will split the string in blocks of 64 bytes each (16 'words').