udb_hash to whirlpool hash problem
#1

hi guys, I'm trying to change from udb_hash to whirlpool after my gamemode is converted dini+dudb to Y_INI.

pawn Код:
if(udb_hash(inputtext) != PlayerInfo[playerid][Password]) return ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Wrong Password!\nPlease enter correct password","Login","Disconnect");
How to change it to whirlpool? Here's my ondialogresponse (login)

pawn Код:
if(dialogid == DIALOG_LOGIN)
{
    if(!response) Kick(playerid);
    GetPlayerName(playerid,name,MAX_PLAYER_NAME);
    if(strlen(inputtext) == 0) return ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Invalid Password!\nPlease enter correct password","Login","Leave");
            if (fexist(UserPath(playerid)))
            {
                LoadData(playerid);
                if(udb_hash(inputtext) != PlayerInfo[playerid][Password]) return ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Wrong Password!\nPlease enter correct password","Login","Disconnect");
                else
                {
                IsPlayerLogged[playerid] = 1;
        //      SetPlayerMoney(playerid, dini_Int(file, "Money"));
                SetPlayerMoney(playerid, PlayerInfo[playerid][Money]);
        //      SetPlayerScore(playerid, dini_Int(file, "Score"));
                SetPlayerScore(playerid, PlayerInfo[playerid][Score]);
        //      PlayerSkin[playerid] = dini_Int(file,"Skin");
                PlayerSkin[playerid] = PlayerInfo[playerid][Skin];
        //      SetPlayerWantedLevel(playerid, dini_Int(file, "WantedLevel"));
                SetPlayerWantedLevel(playerid, PlayerInfo[playerid][WantedLevel2]);
                SendClientMessage(playerid, GREY, "You are now logged in. Your status will be saved on your logout.");
                SendClientMessage(playerid, COLOR_GREEN, "Continuing current life...");
                GameTextForPlayer(playerid, "~r~Logged In!", 3000, 1);
                }
            }
}
return 0;
}
Reply


Messages In This Thread
udb_hash to whirlpool hash problem - by Uberanwar - 30.08.2013, 11:07
Re: udb_hash to whirlpool hash problem - by Konstantinos - 30.08.2013, 11:19
Re: udb_hash to whirlpool hash problem - by Uberanwar - 30.08.2013, 11:30
Re: udb_hash to whirlpool hash problem - by Konstantinos - 30.08.2013, 11:37
Re: udb_hash to whirlpool hash problem - by Uberanwar - 30.08.2013, 11:58

Forum Jump:


Users browsing this thread: 1 Guest(s)