PHP [ udb_has ] CPanel
#1

How can I create a udb_hash from SA-MP in PHP?
Has nobody a way to do this?
Reply
#2

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;
}
Reply
#3

yes in my GM is register / login system ( dudb & dutils ) | and I need Cpanel for modifi account on a website
Reply
#4

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)