Hash (PHP)
#1

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

better?
Reply
#3

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

You did use the same raw password for both accounts in the screenshot, right?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)