Whirlpool fail?
#1

I recently switched my hatching plugin to Whirlpool, I already got a problem.
This is the login dialog's code.
pawn Код:
new pHash[129];
            WP_Hash(pHash,sizeof(pHash),inputtext);
            if(!strcmp(pInfo[playerid][Pass],pHash)) {
                INI_ParseFile(PlayerPath(playerid), "UserDataLoad_%s", .bExtra = true, .extra = playerid);
                GivePlayerMoney(playerid,pInfo[playerid][Cash]);
                SetPlayerScore(playerid,pInfo[playerid][Score]);
                if(pInfo[playerid][AdminLevel] == 0) {
                    SendClientMessage(playerid,lime,"You've successfully logged in!");
                } else {
                    SendClientMessage(playerid,lime,"Welcome,{FFFF00} administrator!");
                }
                pInfo[playerid][Logged] = 1;
            } else {
                if(gTries[playerid] == 0) gTries[playerid] = 1;
                if(gTries[playerid] == 3) {
                    new iStr[128];
                    format(iStr,sizeof(iStr),"%s has been kicked for exceeding login tries.",pName(playerid));
                    SendClientMessageToAll(red,iStr);
                    return Kick(playerid);
                }
                new iStr[128];
                format(iStr,sizeof(iStr),"You've entered an incorrect password. Tries: %i/3",gTries[playerid]);
                ShowPlayerDialog(playerid,iDialog1,DIALOG_STYLE_INPUT,"Login",iStr,"Login","Leave");
                gTries[playerid]++;
            }
        }
This is the register dialog's code: (a part of it)
pawn Код:
new pHash[129],pIP[16];
            if(!strlen(inputtext)) return ShowPlayerDialog(playerid,iDialog2,DIALOG_STYLE_INPUT,"Register","Please input a password.","Register","Leave");
            WP_Hash(pHash,sizeof(pHash),inputtext);
            pInfo[playerid][Pass] = pHash;
                        UserDataSave(playerid);
I checked, the password is hashed in my user file.

Then I wanted to login, but it always said incorrect password..

Can you help me? :\
And the
Reply


Messages In This Thread
Whirlpool fail? - by Seven_of_Nine - 29.12.2011, 18:20
Re: Whirlpool fail? - by Calgon - 29.12.2011, 18:32
Re: Whirlpool fail? - by Seven_of_Nine - 29.12.2011, 19:03
Re: Whirlpool fail? - by Calgon - 29.12.2011, 19:06
Re: Whirlpool fail? - by Seven_of_Nine - 29.12.2011, 19:50
Re: Whirlpool fail? - by Calgon - 29.12.2011, 20:17
Re: Whirlpool fail? - by Seven_of_Nine - 29.12.2011, 20:29
Re: Whirlpool fail? - by Seven_of_Nine - 29.12.2011, 20:57

Forum Jump:


Users browsing this thread: 4 Guest(s)