i have a problem
i have a panel that coded with php and i want to change it to nodejs as backend but i face the problem the password coded with php in this code :
function cryptPassword($password, $salt="fivestar", $rounds=20000) {
if ($salt == "") {
$salt = substr(bin2hex(openssl_random_pseudo_bytes(16)),0,16);
}
$hash = crypt($password, sprintf('$6$rounds=%d$%s$', $rounds, $salt));
return $hash;
and the password in database like that : $6$rounds=20000$fivestar$Lry4zEh3ngJ83Zu9n8CHUos0ed4QkcOWLwsCenwkF2hiid243pIx1AvdNY4VYP/35MaYgfUVCwW4X4tFciIuJ.
I want to arrive to this hash form . How can arrive to this form in javascript with nodejs ??
thanks a lot