<?php
$a = "meow";
$b = $a . "\0woef";
$a = hash_hmac('sha512', $a, 'boegaboe', true);
$b = hash_hmac('sha512', $b, 'boegaboe', true);
function meow($string)
{
$callback = function($char)
{
return str_pad(decbin(ord($char)), 8, '0', STR_PAD_LEFT);
}
return array_map($callback, str_split($string));
}
var_dump(
$a,
$b,
meow($a),
meow($b),
password_hash($a, PASSWORD_BCRYPT, ['salt' => 'boeschrikboeschrikboe!', 'cost' => 12]),
password_hash($b, PASSWORD_BCRYPT, ['salt' => 'boeschrikboeschrikboe!', 'cost' => 12])
);
- Output for 5.4.0 - 5.4.24
- Parse error: syntax error, unexpected 'return' (T_RETURN) in /in/60mJh on line 16
Process exited with code 255. - Output for 5.3.0 - 5.3.28
- Parse error: syntax error, unexpected T_RETURN in /in/60mJh on line 16
Process exited with code 255.
preferences:
165.91 ms | 1395 KiB | 61 Q