For an app I\'m working on, nodejs needs to verify hashes created by PHP and vice-versa.
The problem is, the hashes generated in PHP (via Laravel\'s Hash
I have tried to compute what was said before to get codes that work. As you can see I don't need to replace anything.
On the PHP 7.2.4 side:
On the nodeJS side:
Install bcryptjs package: npm i bcryptjs
var bcrypt = require('bcryptjs');
let hash1="$2y$10$5EaF4lMSCFWe7YqqxyBnR.QmDu1XhoiaQxrOFw.AJZkGCYmpsWDU6";
console.log(bcrypt.compareSync("test123", hash1)); // display true