Whirlpool HASH
#1

Hello I need some help, with the Hash function from Whirlpool

pawn Code:
case 3895:
            {
                new string[128];
                format(string, sizeof(string), "Accounts/%s.ini", GetName(playerid));
                if(response == 0)
                {
                    Kick(playerid);
                }
                else
                {
                    if(!fexist(string))
                    {
                        if(strlen(inputtext) >= 1)
                        {
                            new pw[128];
                            WP_Hash(pw, sizeof (pw), inputtext);
                            RegisterPlayer(playerid, pw);
                        }
                        else
                        {
                            SendClientMessage(playerid, WHITE, "Must be longer than 1 char.");
                        }
                    }
                    else
                    {
                        SendClientMessage(playerid, WHITE, "Your account already exists.");
                    }
                }
            }
Thats the dialogresponce from the register window.

then I got my Register function:

pawn Code:
public RegisterPlayer(playerid, password[])/*register*/
{
    new string[128], Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Name, sizeof(Name));
    format(string, sizeof(string), "Accounts/%s.ini", Name);
    if(!fexist(string))
    {
        dini_Create(string);
        dini_Set(string, "Password", password);
        format(Player[playerid][Password], 128, "%s", password);
but the file shows:

Code:
Password=
What did I do wrong?
Reply


Messages In This Thread
Whirlpool HASH - by Stefand - 06.12.2012, 14:48
Re: Whirlpool HASH - by Lordzy - 06.12.2012, 14:59
Re: Whirlpool HASH - by Stefand - 06.12.2012, 15:13

Forum Jump:


Users browsing this thread: 1 Guest(s)