[HELP] num_hash problem
#2

It's not a PHP Forum .


I think It will solve your problem .


Код:
function num_hash($buf)
{
    $length = strlen($buf);
    $s1 = 0;
    $s2 = 0;
    $n = 0;
    while($n < $length)
    {
        $s1 = ($s1 + ord($buf[$n])) % 65521;
        $s2 = ($s2 + $s1) % 65521;
        $n++;
    }
    return ($s2 << 16) + $s1;
}
I hope that i have helped .
Reply


Messages In This Thread
[HELP] num_hash problem - by Ricop522 - 24.06.2011, 17:21
Re: [HELP] num_hash problem - by rjjj - 24.06.2011, 18:38

Forum Jump:


Users browsing this thread: 3 Guest(s)