udb_hash and Whirlpool - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: udb_hash and Whirlpool (
/showthread.php?tid=558685)
udb_hash and Whirlpool -
EmpireSk - 18.01.2015
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")
Re: udb_hash and Whirlpool -
Remba031 - 18.01.2015
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.
Re: udb_hash and Whirlpool -
HY - 18.01.2015
pawn Код:
if(strval(inputtext) == PlayerInfo[playerid][pPass])
or if you followed an tutorial with hashed passwords:
pawn Код:
udb_hash(inputtext) == PlayerInfo[playerid][pPass])
Re: udb_hash and Whirlpool -
M4D - 18.01.2015
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
Re: udb_hash and Whirlpool -
danish007 - 18.01.2015
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
}
Re: udb_hash and Whirlpool -
Vince - 18.01.2015
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.
Re: udb_hash and Whirlpool -
danish007 - 19.01.2015
Ok can you teach us? WHIRLPOOL? HASH