I am quite new in node. I have read that is recommended to use Crypto for hashing and salting the password to be not visible..but actual I am a little confused how to use it!!?? and what is the function that compares between the input password and the stored hashing password?!! Could you please help me in using Crypto??
app.post("/signup", async (req, res, next) => {
const { username, password} = req.body;
if (!username && !password ) {
res.json({
success: false,
message: "Complete your Sign up "
});
}
const query = `INSERT INTO Users (username ,password) VALUES ('${username}','${password}') `;
const student = await db.run(query);
.....