[Include] rit_Hasher [String/Text/Password Hasher] v1.R
#1

rit_Hasher ©

Introduction :-

"rit_Hash" function hashes string/text/passwords to numerical digits, and it
provides security to texts/passwords from being cracked. Decrypting hashed
strings, encrypted by this function is difficult.Note:Though it returns a string value.
It is only available for "pawno" scripting language . Hence it is not a plugin.

You can freely use this include with these :INI: system while creating a Register
Login system for you server:-

1: Y_INI - "******" - https://github.com/Y-Less

2: DINI - "DracoBlue"

3:MySQL (Most Probably)



Syntax :-

pawn Код:
rit_Hash(buffer[]);

Example :-

Password Input: "rittik"
pawn Код:
case DIALOG_REGISTER: //From Kush's Tutorial
        {
            if (!response) return Kick(playerid);
            if(response)
            {
                if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Registering...",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit");
                new INI:File = INI_Open(UserPath(playerid));
                INI_SetTag(File,"data");
                INI_WriteString(File,"Password",rit_Hash(inputtext));
                INI_WriteInt(File,"Cash",0);
                INI_WriteInt(File,"Admin",0);
                INI_WriteInt(File,"Kills",0);
                INI_WriteInt(File,"Deaths",0);
                INI_Close(File);

                SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
                SpawnPlayer(playerid);
                ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"Great! Your Y_INI system works perfectly. Relog to save your stats!","Ok","");
                        }
        }

        case DIALOG_LOGIN:
        {
            if ( !response ) return Kick ( playerid );
            if( response )
            {
                if(!strcmp(rit_Hash(inputtext),PlayerInfo[playerid][pPass],false))
                {
                    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                    GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
                    ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"You have successfully logged in!","Ok","");
                }
                else
                {
                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"You have entered an incorrect password.\n"COL_WHITE"Type your password below to login.","Login","Quit");
                }
                return 1;
            }
        }
Код:
Output : 861498793485876612876612793485808599
Version :-

v1.R


Bugs Known :-

None. If you get any bugs in future please contact me at
forum.sa-mp.com
or
www.github.com/RittikVerma


Contact :-

Private Message


Credits :-

Sa-Mp Team


Download :-

rit_Hasher Download


Note: This is my first hasher which I created/developed so please don't be too harsh on me.
Reply
#2

It looks effectively the same as udb_hash so I personally wouldn't use it as I doubt it's a secure as Whirlpool and even MD5 for that matter. But good work regardless!
Reply
#3

Quote:
Originally Posted by NewerthRoleplay
Посмотреть сообщение
It looks effectively the same as udb_hash so I personally wouldn't use it as I doubt it's a secure as Whirlpool and even MD5 for that matter. But good work regardless!
To un-doubt yourself you should try to crack it. Anyway Thank you for your comment, and it's too different from udb.
Reply
#4

77 lines of comments, 10 lines of code... Better release it as a function.
Reply
#5

Quote:

77 lines of comments, 10 lines of code... Better release it as a function.

No, sorry. I can't.
Reply
#6

Quote:

It is only available for "pawno" scripting language.

Dude, the language is called pawn. Pawno is the name of the most common editor for this language.
BTW, returning strings (arrays) in pawn with 512 cells may get you an Run time error 3: "Stack/heap collision (insufficient stack size)". Peace.
Reply
#7

Challenge accepted:

Sorry, but it really does suck.
Java version, if anyone wants to test:
Код:
public static String rit_DeHash(String buffer)
	{
		int length = buffer.length();
		String result = "";
		String temp = "";
		for(int i=0;i<length;i++)
		{
			temp = temp + buffer.charAt(i);
			if(Integer.parseInt(temp) % 7557 == 0 && Integer.parseInt(temp)!= 0)
			{
				if(i < length-1 && buffer.charAt(i+1) == '0') continue;
				result += Character.toString((char) (Integer.parseInt(temp)/7557));
				//System.out.println(result);
				temp = "";
			}
			
		}
		return result;
		
	}
Reply
#8

@wups DAMN! You beat me to it I was trying to do it in the few minutes I had before work -.- But yea it's actually very similar to udb. Sorry about the formatting, just took the function from my GitHub repo

Reply
#9

Quote:
Originally Posted by NewerthRoleplay
Посмотреть сообщение
@wups DAMN! You beat me to it I was trying to do it in the few minutes I had before work -.- But yea it's actually very similar to udb. Sorry about the formatting, just took the function from my GitHub repo

Cheers! Udb_hash is much more complicated than this. I have yet to see a working decoder for it, I tried to make such, no luck though
Reply
#10

Quote:
Originally Posted by wups
Посмотреть сообщение
Cheers! Udb_hash is much more complicated than this. I have yet to see a working decoder for it, I tried to make such, no luck though
I am trying to make a complicated hasher this time which will be more difficult to decipher.

As I said in my thread that "this is my first hasher don't be harsh on me".
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)