How to save passoword using y_ini
#1

Hello,

I am using y_ini currently to update my server. But ive used udb hasher to encrypt passwords if someone can tell me how to save pass word's as a string when a player using DIALOG_STYLE_PASSWORD and input's a text using the keyboard (ofc).

If somone know's how do it please share the information. Will appreciate as a human being and will rep as well being a forum active member.Thank you!

- Ballu Miaa
Reply
#2

pawn Код:
new File:file = INI_Open("account.ini");
INI_SetTag(file,"pData");
INI_WriteString(file,"Password",HASHEDPASSHERE);
You have to hash the "inputtext" in OnDialogResponse and make sure you open the right file. Does this help you? =D
Reply
#3

Quote:
Originally Posted by Jochemd
Посмотреть сообщение
pawn Код:
new File:file = INI_Open(string);
INI_SetTag(file,"pData");
INI_WriteString(file,"Password",HASHEDPASSHERE);
Does this help you? =D
I know about WriteString function of y_ini bu the problem is im not able to input it as a string using an INPUT DIALOG OR PASSWORD DIALOG. Please let me know if you know how to input it in under OnDialogResponse callback. Im using udb hasher to encrypt password and save as an integer!

Thanks for the reply
Reply
#4

pawn Код:
new File:file = INI_Open(string);
INI_SetTag(file,"pData");
INI_WriteString(file,"Password",udh_hash(inputtext));
udb_hash returns the hashed password. Got how it works now?
Reply
#5

Quote:
Originally Posted by Jochemd
Посмотреть сообщение
pawn Код:
new File:file = INI_Open(string);
INI_SetTag(file,"pData");
INI_WriteString(file,"Password",udh_hash(inputtext));
udb_hash returns the hashed password. Got how it works now?
So if i will use it as a string it will be the same on the .ini file as the person input's from the dialog. ?
Reply
#6

Quote:
Originally Posted by Ballu Miaa
Посмотреть сообщение
So if i will use it as a string it will be the same on the .ini file as the person input's from the dialog. ?
Yeah, if you put "inputtext" in there it will write the text inputted of course. Though, recommended to hash.
Reply
#7

Quote:
Originally Posted by Jochemd
Посмотреть сообщение
Yeah, if you put "inputtext" in there it will write the text inputted of course. Though, recommended to hash.
Im gonna test that tomorrow! I hope it work's thanks for the help mate. Peace! (Rep+)
Reply
#8

Quote:
Originally Posted by Ballu Miaa
Посмотреть сообщение
Im gonna test that tomorrow! I hope it work's thanks for the help mate. Peace! (Rep+)
You are welcome.
Reply
#9

Quote:
Originally Posted by Jochemd
Посмотреть сообщение
pawn Код:
new File:file = INI_Open(string);
INI_SetTag(file,"pData");
INI_WriteString(file,"Password",udh_hash(inputtext));
udb_hash returns the hashed password. Got how it works now?
When i use this as a string it says Tag type mismatch error!

Anyone can help me pleasE?
Reply
#10

Very nice tutorial :

https://sampforum.blast.hk/showthread.php?tid=273088
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)