View Single Post
Old 09-01-2009, 03:18 PM   #11 (permalink)
Village Idiot
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

Quote:
Originally Posted by gamer13 View Post
Mostly I use this technique:

PHP Code:
<?php
function customHashFunction($password)
{
    return 
md5(pack('H*'md5($password)) . $password);
}
It generates a fairly strong salted md5 hash, because the pack-function returns a low-valued ASCII code, which might not even be printable (values below ASCII 32, which is a space).
That adds no more security and any other salt. Packing it merely scrambles the value in a known (and reversible) way before hashing it.
__________________

Village Idiot is offline  
Reply With Quote