[Pedido] Hash
#1

Sei que й foda ficar pedindo coisas, ainda mais para min que registrei minha conta a poco tempo, mas eu nгo consegui entender o sistema de criptografia hash, alguйm poderia me mostrar como aplicar hash a esse meu sistema de login?

PHP код:
        case registro:
        {
            if(!
response) return Kick(playerid);
            if(
response)
             {
                if(
strlen(inputtext) < || strlen(inputtext) > 20)
                {
                    return 
ShowPlayerDialog(playerid,registro,DIALOG_STYLE_INPUT,"{00FF7F}Registro""{F0E68C}Digite apenas nъmeros{FFFFFF}.\n{F0E68C}Digite sua senha novamente para se registrar{FFFFFF}.""Confirma""Cancelar");
                }
                
pDados[playerid][Staff] = 0;
                
pDados[playerid][VIP] = 0;
                
pDados[playerid][Level] = 1;
                
pDados[playerid][Dolar] = 800;
                
DOF2_CreateFile(GetarConta(playerid));
                
DOF2_SetString(GetarConta(playerid),"Senha",inputtext);
                
DOF2_SaveFile();
                
Logado{playerid} = true;
                
GivePlayerMoney(playerid,800);
                
ShowPlayerDialog(playeridsexoDIALOG_STYLE_MSGBOX"{00FF7F}Sexo""{F0E68C}Vocк se cadastrou, agora escolha qual seu sexo{FFFFFF}.""Masculino""Feminino");
            }
        }
        case 
logar:
        {
            if(!
response) return Kick(playerid);
            if(
response)
            {
                if(!
strlen(inputtext))
                {
                    return 
ShowPlayerDialog(playerid,logar,DIALOG_STYLE_PASSWORD"{00FF7F}Logar""{F0E68C}Digite sua senha cadastrada para logar{FFFFFF}.\n{F0E68C}Se errar cinco vezes vocк serб kickado{FFFFFF}.""Confirma""Cancelar");
                }
                if(!
strcmp(DOF2_GetString(GetarConta(playerid),"Senha"), inputtext))
                {
                    
CarregarConta(playerid);
                    
SetSpawnInfo(playerid001722.5123, -1912.793113.5647269.15000000);
                    
SpawnPlayer(playerid);
                    
TogglePlayerSpectating(playeridfalse);
                    
Logado{playerid} = true;
                } else {
                if(
SenhaErrada[playerid] == 1)
                {
                    
SendClientMessage(playerid,-1,"Vocк foi kickado por errar a senha 2 vezes!");
                    
Kick(playerid);
                }
                    else if(
SenhaErrada[playerid] < 1)
                    {
                        
SenhaErrada[playerid] ++;
                        
ShowPlayerDialog(playerid,logar,DIALOG_STYLE_PASSWORD"{00FF7F}Logar""{F0E68C}Digite sua senha cadastrada para logar{FFFFFF}.\n{F0E68C}Se errar cinco vezes vocк serб kickado{FFFFFF}.""Confirma""Cancelar");
                    }
                }
            }
        } 
Reply


Messages In This Thread
Hash - by yurin - 29.06.2016, 00:37
Respuesta: Hash - by SammyJ - 29.06.2016, 01:00
Re: Hash - by yurin - 29.06.2016, 01:34

Forum Jump:


Users browsing this thread: 1 Guest(s)