note 57848 deleted from function.md5 by joey
| From: | joey@php.net | Date: | Sun, 17 Jul 2011 08:45:17 +0000 |
| Subject: | note 57848 deleted from function.md5 by joey | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-181615@lists.php.net to get a copy of this message | ||
Note Submitter: nathan at nathanbolender dot com
----
If you're a security freak you might want to take a look at the 2 functions I have posted at http://code.nathanbolender.com/PHP/salt_pepper/
. It uses a hardcoded "key" and hashes it one of 2 ways, so you are always left with a
random 'hash' to store in your database. The other function will check the hash against
the original string to make sure that it is correct. If you want to see an example of the debug
output you can at http://code.nathanbolender.com/PHP/salt/ . Note
that on that page the "key" is random only to demonstrate the possibility for so much
variations.
I know that a simple md5() would normally be enough, but I came up with this and I wanted to share
it.