Password | ' . $password . ' | ' . PHP_EOL;
//https://www.php.net/manual/en/function.openssl-random-pseudo-bytes.php
$i = 10;
$salt = bin2hex( openssl_random_pseudo_bytes( $i, $cstrong ) );
$salted = $salt . '_' . $password;
$md5Pass = md5( $salted );
$hashPass = password_hash( $salted, PASSWORD_BCRYPT);
$gostPass = hash( 'gost', $salted );
$message['result'] .= 'Saltlength (bytes/hex) | ' . $i . '/' . strlen( $salt ) . ' |
' . PHP_EOL;
$message['result'] .= 'Salt : | ' . print_r( $salt, TRUE ) . ' |
' . PHP_EOL;
$message['result'] .= 'Salt + password | ' . $salted . ' |
' . PHP_EOL;
$message['result'] .= 'MD5 hash | ' . print_r( $md5Pass, TRUE ) . ' |
' . PHP_EOL;
$message['result'] .= 'Bcrypt hash | ' . print_r( $hashPass, TRUE ) . ' |
' . PHP_EOL;
$message['result'] .= 'Gost hash | ' . print_r( $gostPass, TRUE ) . ' |
' . PHP_EOL;
$table = "Passwordhash with Salt";
include ('head.php');
?>
Passwordhash with salt
➠ Check your password strength
➠ Openssl Random Pseudo Bytes
➠ PHP code of this page
In case you came from afar
➠ See more about passwords
➠ Salted Password Hashing - Doing it Right