Has hash better then WP_Hash? -
rolex - 02.04.2018
Hi brothers, i have a problem with my login/register system.
Today i use WP_Hash but player can log in with a wrong password. I've searching but have no results to solve that problem. The question is, has a another encript code/type to use in login/register system?
Re: Has hash better then WP_Hash? -
kovac - 02.04.2018
You're doing something wrong for sure. It would be good to post your code.
Re: Has hash better then WP_Hash? -
ISmokezU - 02.04.2018
You are probably doing something wrong when comparing strings.
Have a look here:
https://sampwiki.blast.hk/wiki/Strcmp
On a side note, I suggest
Salting Passwords for more complex encryption.
Re: Has hash better then WP_Hash? -
rolex - 02.04.2018
PHP код:
new file[24], PASS, PASS_2;
format(file, sizeof(file), "Players/%s.ini", PName(playerid));
PASS = dini_Int(file, "PASS");
PASS_2 = num_hash(inputtext);
file with pName exist and if i want to load her level or another info, will return the right value, but ONLY PASS return value 0 from file.
Example:
PHP код:
i wrote "SAMPFORUM" and it return a 2039451 hash pass.
in file, PASS value is "20344900".
PASS_2 get right value = "2039451"
but
PASS don't get value from file, returning "0" value to PASS var.
PLEASE, i've spend a lot of hours in that sh** and can't solve this. I Know about MySQL and bla bla bla, but NOW it's has not a possibility to change my gamemode to MySQL.
Re: Has hash better then WP_Hash? -
kovac - 02.04.2018
Use dini_Get/Set for strings.
WP_Hash should return 128 chartered hashed password.
There is always possibility to change to MySQL. It's not as hard as you think.. I can help you in that, contact me if you want.
Re: Has hash better then WP_Hash? -
rolex - 02.04.2018
i've using num_hash, not WP_Hash..
Re: Has hash better then WP_Hash? -
kovac - 02.04.2018
PHP код:
PASS_2 = num_hash(strval(inputtext));
?
Re: Has hash better then WP_Hash? -
rolex - 02.04.2018
PASS_2 var has a right value in integers, not string.
The problem is PASS var doesn't load the player file "PASS" value.
@Edit:
I Will transfer everything to MySQL. Thank you all.