IF you are going to do this, don't just MD5 the result:
$pass = "***";
$salt = "!@)#%%@(#&@_!R151";
$pass = sha1($pass.$salt);
$pass = md5($pass);
Instead, run md5 on the result and the inputs...
$pass = "***";
$salt = "!@)#%%@(#&@_!R151";
$tmp = sha1($pass.$salt);
$pass = md5($tmp . $pass . $salt);
The reason is that if you do md5(sha1())
, you're basically increasing the chances of collision. The reason is that all sha1
collisions would automatically be collisions in the md5
call (hence it's a superset of the collisions). By re-entering the password and salt, you're preventing that from happening, and hence creating a "stronger" hash rather than a weaker one...