09.03.2009, 13:11
How can I create a udb_hash from SA-MP in PHP?
Has nobody a way to do this?
Has nobody a way to do this?
adler32_hash(buf[])
{
new length=strlen(buf);
new s1 = 1;
new s2 = 0;
new n;
for (n=0; n<length; n++)
{
s1 = (s1 + buf[n]) % 65521;
s2 = (s2 + s1) % 65521;
}
return (s2 << 16) + s1;
}
Originally Posted by ssǝן‾ʎ
Use a better hash function which is in PHP and PAWN, udb_hash is insanely simple.
|