Created
August 14, 2020 02:31
-
-
Save parzibyte/363bccfe1ace0a2352f91381c5ed548e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Recuperamos la contraseña de la petición | |
const palabraSecretaTextoPlano = "hunter2"; | |
// Y la guardada en la base de datos | |
const palabraSecretaEncriptada = "$2a$10$P9yvh9ew5ZueNRjQGX4Eiui9jNhaKJCX24mRsrWSNvj.0O2FjNSB2"; | |
// Comprobamos... | |
const palabraSecretaValida = await bcrypt.compare(palabraSecretaTextoPlano, palabraSecretaEncriptada); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment