Num_Hash in PHP?
#1

If anyone is decent with PHP, how would I convert this stock into PHP?

I'm using it for a simple online user account system, I am not concerned with security, I would just like to know how to do it.

pawn Код:
stock num_hash(buf[])//Dutils.inc
 {
    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


Messages In This Thread
Num_Hash in PHP? - by jakejohnsonusa - 29.08.2014, 05:22
Re: Num_Hash in PHP? - by terrance - 29.08.2014, 05:56
Re: Num_Hash in PHP? - by jakejohnsonusa - 29.08.2014, 14:42

Forum Jump:


Users browsing this thread: 1 Guest(s)