udb_hash and Whirlpool
#1

How to fix it when there do not even want udb_hash and Whirlpool
Code:
PHP код:
if(inputtext == PlayerInfo[playerid][pPass]) 
Error:
PHP код:
error 033: array must be indexed (variable "inputtext"
Reply
#2

Use strcmp to compare the 2 strings.

https://sampwiki.blast.hk/wiki/Strcmp

You should really use Whirlpool or udb_hash because saving passwords as plain text is not secure.
Reply
#3

pawn Код:
if(strval(inputtext) == PlayerInfo[playerid][pPass])
or if you followed an tutorial with hashed passwords:

pawn Код:
udb_hash(inputtext) == PlayerInfo[playerid][pPass])
Reply
#4

Quote:
Originally Posted by HY
Посмотреть сообщение
pawn Код:
if(strval(inputtext) == PlayerInfo[playerid][pPass])
!! If someone use letters for password ? Password os string ! As remba031said he should use strcmp

But NEVER save unhashed passwords
If someone hack your vps or database, he can use all passwords !
Hash them for more security
Reply
#5

Can you show your register code?
Or simply hash password while registering....
example:
If you are using YSI.

pawn Код:
INI_WriteInt(File,"password",udb_hash(inputtext));
Login as "HY" said...
use
pawn Код:
if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
{
//code
}
Reply
#6

udb_hash is not a hashing algorithm! That function is only marginally better than saving plaintext passwords in that the password can't be viewed directly, but it can be cracked in seconds. It's not secure at all. Stop using it! Use Whirlpool, the Hash plugin or the hash functions in MySQL.
Reply
#7

Ok can you teach us? WHIRLPOOL? HASH
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)