Y_ini and Whirlpool
#1

Hello everyone,

I have a strange problem with Y_INI and Whirlpool. every time Y_ini saves the hash it deletes the last character of the hash

this is my register command:
pawn Код:
YCMD:register(playerid, params[], help)
{
    if(help)
    {
        SendClientMessage(playerid, 0xFF0000AA, "Creates a account.");
    }
    if(gPlayerInfo[playerid][PLAYER_REGGED] == 1)
    return SendClientMessage(playerid, COLOR_ORANGE, "ERROR: You have already registered!");
    else if(!params[0])
    return SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /register [password]");
    else if(strlen(params) < gSettings[PASS_MIN] || strlen(params) > gSettings[PASS_MAX])
    {
        new string[63];
        format(string, sizeof(string), "ERROR: Password must be between %d and %d characters long!", gSettings[PASS_MIN], gSettings[PASS_MAX]);
        return SendClientMessage(playerid, COLOR_ORANGE, string);
    }
        else
    {
        new buf[129];
        WP_Hash(buf, 129, params);
        format(gPlayerInfo[playerid][PLAYER_PASS], 129, "%s", buf);
        print(gPlayerInfo[playerid][PLAYER_PASS]);
        new pName[MAX_PLAYER_NAME]; GetPlayerName(playerid,pName,sizeof pName);
        new file[37];
        format(file,sizeof file,PlayerFile,pName);
        new INI:handler = INI_Open(file);
        INI_WriteString(handler, "Pass", buf);
        INI_Close(handler);
        print(buf);
        gPlayerInfo[playerid][PLAYER_REGGED] = 1;
        gPlayerInfo[playerid][PLAYER_LOGGED] = 1;
        GetPlayerIp(playerid, gPlayerInfo[playerid][PLAYER_IP], 16);
        SaveUser(playerid);
        new string[128]; format(string, sizeof(string), "You have successfully registered your account with the password \'%s\'. You have been automatically logged in.", params);
        return SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    }
}
i hope one of you can help me with it, its really annoying cause the whole login system wont work now.

it works for a large part, but only this
Код:
CE4E7BFAC27A4BD5F015ADF67F0FA3072B9AF27774E1E14028E69B85858BC6116A02E67B985A97C07EC844B94DCD4F1C48F354AE19D588C512A3FA195082528A
becomes this

Код:
CE4E7BFAC27A4BD5F015ADF67F0FA3072B9AF27774E1E14028E69B85858BC6116A02E67B985A97C07EC844B94DCD4F1C48F354AE19D588C512A3FA195082528
Thanks in advance,

Sansko.
Reply


Messages In This Thread
Y_ini and Whirlpool - by sansko - 03.08.2011, 16:14
Re: Y_ini and Whirlpool - by Guest3598475934857938411 - 03.08.2011, 16:37
Re: Y_ini and Whirlpool - by iggy1 - 03.08.2011, 16:41
Re: Y_ini and Whirlpool - by sansko - 03.08.2011, 16:54

Forum Jump:


Users browsing this thread: 2 Guest(s)