Just to know about bcrypt hash comparison in different platforms, that I have one brypt hash which is generated at Nodejs server, now I am moving to PHP, I want to know about is this possible to compare already created bcrypt hashes(generated in Nodejs) in PHP
Node JS Code:
function hash(password) {
return new Promise(function(fulfill, reject) {
bcrypt.hash(password, 8, function(err, hashedPassword) {
if (err) {
reject(err);
} else {
fulfill(hashedPassword);
}
});
});
}
Input : simha
output: $2a$10$c/EwGsRkoV4XHmsOJYWZ6.LurbDUFW.eq83SI8eu5JaMOsr6PyLrm
Is it possible to generate the ouput hash using input simha
in PHP
I am trying the below one, but it is generating different hash
password_hash($password, PASSWORD_BCRYPT)
//output : $2y$10$CfihL9RipXW88JAVvlyFlegM5BAyD5xQmNutjm9KepeXUn5cAwIX2