decoding with nodejs from mysql that encoded with php

  javascript, mysql, node.js, php

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 :

i want to decode this with nodejs .
and if i want to encode in nodejs how to do it ?

thanks a lot

Source: Ask PHP