1 (edited by Infinity99 2007-08-07 08:32)

Topic: pun_hash()?

Hello,I've tried to integrate my site and encounter pun_hash() function.Can I use my code inside this function so that I don't have to change all my site
I intend to use mysql function PASSWORD() to make password for users but it cause error when i tried to install punbb

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); */
                       return PASSWORD($str);
    }

can i just do that or should i add another code?it i should,can you write it for me?