added password_hash

This commit is contained in:
Sergio Álvarez 2019-11-05 10:32:39 +01:00
parent 39ca9d90cc
commit ce920d9c1b
1 changed files with 7 additions and 0 deletions

View File

@ -65,6 +65,13 @@ if ($action == 'reset') {
$t2 = (microtime(true) - $t1) * 1000;
$result .= sprintf("%-15s %.3f %3d %s\n", $algo, $t2, strlen($r), $r);
}
// password_hash(PASSWORD_DEFAULT)
$t1 = microtime(true);
$r = password_hash($str, PASSWORD_DEFAULT);
$t2 = (microtime(true) - $t1);
$result .= sprintf("%-15s %.3f %3d %s\n", 'password_hash', $t2, strlen($r), $r);
$result = trim($result);
$help = 'hash';