PHP hash whirlpool
#1

Hi there
How to switch from SHA512 hash to whirlpool from code below


Код:
$SQLAddUser -> execute(array(':username' => $_POST['username'], ':password' => hash('SHA512', $_POST['password']), ':mbt' => intval($_POST['mbt']), ':expire' => strtotime("{$_POST['day']} {$_POST['month']} {$_POST['year']}")));
Problem is that i got this source from another thing and now i wanna switch it for samp but hash is in SHA512. Should i just remove SHA512 and write whirlpool instead?
Reply
#2

Yes, Change "SHA512" to "whirlpool".

http://php.net/manual/en/function.hash.php
Reply
#3

Additional hint: PHP's whirlpool implementation uses upper case letters where PAWN's implementation uses lowercase letters. When I used it, I had to use a toUpper function to get correctly matching passwords.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)