<?php
$password = 'foobar';
$salt = 'qwertzuiopasdfghjklyxc';
$hash = password_hash($password, PASSWORD_BCRYPT, [
'salt' => $salt,
]);
$froxlor_pwd_salt = str_replace(substr(strrchr($hash, "$"), 1), "", $hash);
$froxlor_pwd_check = crypt($password, $froxlor_pwd_salt);
$my_pwd_check = crypt($password, $froxlor_pwd_salt . $salt);
printf("Password hashed (db): %s\n
used salt: %s\n
---\n
Froxlor password salt: %s\n
Froxlor password check: %s\n
---\n
My password check: %s",
$hash, $salt,
$froxlor_pwd_salt, $froxlor_pwd_check,
$my_pwd_check);
preferences:
35.43 ms | 402 KiB | 5 Q