Hash (PHP) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Other (
https://sampforum.blast.hk/forumdisplay.php?fid=7)
+--- Forum: Everything and Nothing (
https://sampforum.blast.hk/forumdisplay.php?fid=23)
+--- Thread: Hash (PHP) (
/showthread.php?tid=518011)
Hash (PHP) -
Mriss - 07.06.2014
Okay so Im getting a problem, I have whirlpool hash on my script and I want to continue using it, but I made a script where I can register without going ingame, it works fine but the hash is not the same as the SA:MP Whirlpool i registered the top account ingame
And this bottom one in the script >

I did the same password but they not the same when hashed...
PHP CODE>
PHP код:
<?
require_once("config.php");
$user = mysql_real_escape_string($_POST['user']);
$pass = Whirlpool(mysql_real_escape_string($_POST['lastname']));
$admin = mysql_real_escape_string($_POST['Admin']);
$sql="INSERT INTO players (user, pass, Admin)
VALUES ('$user', '$pass', '$admin')";
mysql_query($sql);
function Whirlpool($str)
{
return strtoupper(hash('whirlpool', $str));
}
?>
Re: Hash (PHP) -
Mriss - 07.06.2014
better?
AW: Hash (PHP) -
ThomasTailor93 - 07.06.2014
You don't need mysql_real_escape_string in whirlpool because special characters will be hashed.
Just use $pass = Whirlpool($_POST['lastname']);
Maybe this will solve the wrong output error.
Re: Hash (PHP) -
SchurmanCQC - 08.06.2014
You
did use the same raw password for both accounts in the screenshot, right?