note 81671 added to function.md5
| From: | karlo1 at gmail dot com | Date: | Sun, 09 Mar 2008 13:53:30 +0000 |
| Subject: | note 81671 added to function.md5 | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-136863@lists.php.net to get a copy of this message | ||
How to properly salt the password.
This actually is very simple.
<?php
$pass=$_POST['pass'];
$salt='i_always_take_a_sentence_or_two_and_add_some_numbers_8342394';
$salted_md5=md5($pass);
?>
Now it is almost impossible to find the password using rainbow tables.
Of course you shouldn't tell anyone your $salt.
----
Server IP: 83.137.20.135
Probable Submitter: 212.182.191.205
----
Manual Page -- http://www.php.net/manual/en/function.md5.php
Edit -- https://master.php.net/note/edit/81671
Del: integrated -- https://master.php.net/note/delete/81671/integrated
Del: useless -- https://master.php.net/note/delete/81671/useless
Del: bad code -- https://master.php.net/note/delete/81671/bad+code
Del: spam -- https://master.php.net/note/delete/81671/spam
Del: non-english -- https://master.php.net/note/delete/81671/non-english
Del: in docs -- https://master.php.net/note/delete/81671/in+docs
Del: other reasons-- https://master.php.net/note/delete/81671
Reject -- https://master.php.net/note/reject/81671
Search -- https://master.php.net/manage/user-notes.php