encriptar_password
v1.0.4
Published
import*as bcrypt from"bcrypt";
Downloads
4
Readme
import*as bcrypt from"bcrypt";
consthassPass=async(pass)=>{
returnawait bcrypt.hash(pass, 10);
};
constdescriptPass=async(pass, password_encriptado)=>{
const comparePass =await bcrypt.compare(pass, password_encriptado);
if(comparePass){
return"Acceso permitido";
}else{
return"Acceso denegdo";
}
};
module.exports={ hassPass, descriptPass };