io_write question
#2

Better use this to hash players passwords so you don't have to load them from file?

pawn Код:
stock udb_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


Messages In This Thread
io_write question - by Headshot1108 - 24.06.2010, 13:58
Re: io_write question - by MadeMan - 24.06.2010, 14:03
Re: io_write question - by Headshot1108 - 24.06.2010, 14:08

Forum Jump:


Users browsing this thread: 1 Guest(s)