Password Hashing
#1

How do I stop the passwords from hashing?
Like, how can I see the actual password in the scriptfiles folder when I click on the players name.
In other words, is there something else I can replace the udb_hash with to make it not hash(encrypt) out the players password?

Here's some code:
Код:
stock udb_hash(buf[]) {
    new length=strlen(buf);
    new s1 = 1;
    new s2 = 0;
    new n;
    for (n=0; n<length; n++)
    {
       s1 = (s1 + buf[n]) % 65521;
       s2 = (s2 + s1)     % 65521;
    }
    return (s2 << 16) + s1;
}
Код:
	if(dialogid == 20)
 	{
  		if(!response) return Kick (playerid);
    	if(response)
     	{
      		if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
        	{
        	    new string[128];
         		INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
           		GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
             	format(string, sizeof(string), "System: Welcome back to Gangwar Deathmatch, %s.", PlayerName(playerid));
             	SendClientMessage(playerid, COLOR_WHITE,string);
				LoggedIn[playerid] = 1;
         	}
          	else
           	{
            	ShowPlayerDialog(playerid,20,DIALOG_STYLE_PASSWORD,"Login",""BR"You have entered an Incorrect Password.\n"LB"Please try again.","Login","Exit");
            }
            return 1;
        }
Код:
       	INI_WriteInt(File,"Password", PlayerInfo[playerid][pPass] = udb_hash(inputparam));
Reply


Messages In This Thread
Password Hashing - by nicholasramdhan - 24.03.2015, 08:39
Re: Password Hashing - by Smileys - 24.03.2015, 08:43
Re: Password Hashing - by nicholasramdhan - 24.03.2015, 08:49
Re: Password Hashing - by X337 - 24.03.2015, 08:55
Re: Password Hashing - by Mya - 24.03.2015, 09:05
Re: Password Hashing - by JaydenJason - 24.03.2015, 09:07
Re: Password Hashing - by nicholasramdhan - 24.03.2015, 09:14
Re: Password Hashing - by Sew_Sumi - 24.03.2015, 10:04
Re: Password Hashing - by SickAttack - 24.03.2015, 13:27

Forum Jump:


Users browsing this thread: 1 Guest(s)