Problem with password [rep+]
#1

I have problem with password.

When im entering my password, like: yxcvbnm or asdfghjk or qwertzuiop, in .ini file password always be: 251790158


here is system for password:

udb_hash:

Код:
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;
}
other register system:

Код:
enum RegisterInfo
{
   rPlayer,
    rPass
   // im delete others 
}
Код:
public loadaccount_RegisterData(playerid, name[], value[])
{
    INI_Int("Register",rInfo[playerid][rPlayer]);
    INI_Int("Password",rInfo[playerid][rPass]);
   // im delete others
    return 1;
}
script on dilog system, where is entered password.

Код:
                new INI:File = INI_Open(RegisterPath(playerid));
                INI_SetTag(File,"RegisterData");
                INI_WriteInt(File,"Register",0);
                INI_WriteInt(File,"Password",udb_hash(inputtext));
                // im delete others
                INI_Close(File);
Reply
#2

That's because you're hashing the passwords. That's what that stock is for.
Reply
#3

im fix this.


but thanks for your reply
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)