Topic: Password Incryption

How do you guys incrypt your password? I know you dont use MD5 alone since i compared the a password in the DB and the same pass MD5'd and they were not alike... so how do you encrypt your passwords since i cannot figure it out...

Re: Password Incryption

PunBB is using sha1 if it's availible (PHP 4 >= 4.3.0, PHP 5), and md5 otherwice.

Edit: Mhash can also be used... here is the code:

function pun_hash($str)
{
    if (function_exists('sha1'))    // Only in PHP 4.3.0+
        return sha1($str);
    else if (function_exists('mhash'))    // Only if Mhash library is loaded
        return bin2hex(mhash(MHASH_SHA1, $str));
    else
        return md5($str);
}