Created
August 14, 2020 02:17
-
-
Save parzibyte/558786103edd3bc7f9e3265544a70d87 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
// Importamos paquete | |
const bcrypt = require("bcryptjs"); | |
// Primero vamos a hashear la contraseña | |
const palabraSecretaTextoPlano = "hunter2"; | |
// Entre más rondas, mejor protección, pero más consumo de recursos. 10 está bien | |
const rondasDeSal = 10; | |
const palabraSecretaEncriptada = await bcrypt.hash(palabraSecretaTextoPlano, rondasDeSal); | |
console.log("Y hasheada es: " + palabraSecretaEncriptada); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment