Different results for PHP/Pawn Adler32 hash
#2

Try to use this code for your php...
Код:
function num_hash($pass)
{
	$length = strlen($pass);
	$s1 = 1;
	$s2 = 0;
	    
	for($i=0; $i<$length; $i++)
	{
		$s1 = ($s1 + ord($pass[$i])) % 65521;
		$s2 = ($s2 + $s1)       % 65521;
	}
	$wy= ($s2 << 16) + $s1;
	return $wy;
}
It should give the same result as the pawn one.
Reply


Messages In This Thread
Different results for PHP/Pawn Adler32 hash - by Peppe95 - 05.09.2010, 12:02
Re: Different results for PHP/Pawn Adler32 hash - by tjying95 - 05.09.2010, 12:21
Re: Different results for PHP/Pawn Adler32 hash - by Peppe95 - 05.09.2010, 12:31
Re: Different results for PHP/Pawn Adler32 hash - by Calgon - 05.09.2010, 14:32
Re: Different results for PHP/Pawn Adler32 hash - by Mattos - 19.11.2011, 19:44
Re: Different results for PHP/Pawn Adler32 hash - by System64 - 19.11.2011, 19:54
Re: Different results for PHP/Pawn Adler32 hash - by Calgon - 19.11.2011, 19:56

Forum Jump:


Users browsing this thread: 1 Guest(s)