PHP [ udb_has ] CPanel - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: PHP [ udb_has ] CPanel (
/showthread.php?tid=68342)
PHP [ udb_has ] CPanel -
gernes - 09.03.2009
How can I create a udb_hash from SA-MP in PHP?
Has nobody a way to do this?
Re: PHP [ udb_has ] CPanel -
lesley - 09.03.2009
Anyways, he asked for it, and i beleave the one udb_hash is doing is simply adler32:
pawn Код:
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;
}
Re: PHP [ udb_has ] CPanel -
gernes - 09.03.2009
yes

in my GM is register / login system ( dudb & dutils ) | and I need Cpanel for modifi account on a website
Re: PHP [ udb_has ] CPanel -
boylett - 09.03.2009
http://uk3.php.net/manual/en/ref.hash.php
Use 'adler32' in the $algo param.
I suggest you do what ****** said though
Quote:
Originally Posted by ssǝן‾ʎ
Use a better hash function which is in PHP and PAWN, udb_hash is insanely simple.
|