Skip to content

Instantly share code, notes, and snippets.

@desaijay315
Created April 2, 2019 11:00
Show Gist options
  • Save desaijay315/749d4af9570ab54acf81de9204bfb7aa to your computer and use it in GitHub Desktop.
Save desaijay315/749d4af9570ab54acf81de9204bfb7aa to your computer and use it in GitHub Desktop.
const myfunc = async () =>{
const password = 'Red12345'
const hashedPassword = await bcrypt.hash(password, 8)
console.log(password);
console.log(hashedPassword);
//if a give password amtch the hash passwrod
const isMatch = await bcrypt.compare('Red12345', hashedPassword)
console.log(isMatch);
}
myfunc()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment