Has hash better then WP_Hash?
#1

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?
Reply
#2

You're doing something wrong for sure. It would be good to post your code.
Reply
#3

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.
Reply
#4

PHP код:
            new file[24], PASSPASS_2;
            
format(filesizeof(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 filePASS 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.
Reply
#5

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.
Reply
#6

i've using num_hash, not WP_Hash..
Reply
#7

PHP код:
PASS_2 num_hash(strval(inputtext)); 
?
Reply
#8

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)