, .
:
/home/username/key
/home/username/public_html/login.php
() . 512- .
. , 16 .
, :
hash('sha256', $password . $salt . $key);
. MD5 SHA-1. SHA-2, SHA-256 SHA-512. , Whirlpool - .
, , :
public static function hash($algorithm, $data, $iterations = 1, $rawOutput = false)
{
if ($iterations < 1)
throw new Exception('There must be at least one iteration.');
while ($iterations--)
{
$data = hash($algorithm, $data, true);
}
return ($rawOutput ? (binary) $data : bin2hex($data));
}