Hash MyBB
#1

I'm trying to use the MyBB hash in PAWN to try to create a login system, but the following happens. I do not know if the problem should be differentiation because of capital letters or whatever. But I debugged how I am using the function:

pawn Код:
debug with tolower: C17B0956505182F5308108A602077A1D
debug with toupper: E1B1BC3B6D56D56531FF2E47106F6A9E
I will leave the code of how the function is, so that if anyone can help I will be grateful:

PHP код:
Dialog:DialogLogin(playeridresponselistiteminputtext[])
{
    if(
response)
    {
        if(
strcmp(MyBB_Hash(inputtextAPlayerData[playerid][Salt]), APlayerData[playerid][Password]) == 0)
        {
            
cache_set_active(APlayerData[playerid][Player_Cache]);
            
cache_get_value_int(0"uid"APlayerData[playerid][ID]);
            
cache_delete(APlayerData[playerid][Player_Cache]);
            
APlayerData[playerid][Player_Cache] = MYSQL_INVALID_CACHE;
            
APlayerData[playerid][LoggedIn] = true;
            
SendClientMessage(playeridCOLOR_GREEN"Logado com sucesso.");
        }
        else
        {
            
SendClientMessage(playeridCOLOR_LIGHTRED"Senha incorreta.");
            
Dialog_Show(playeridDialogLoginDIALOG_STYLE_PASSWORD"Logando""Teste""Registrar""Sair");
        }
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)