password-decrypt-encrypt-node
v1.0.0
Published
password decrypt and encrypt node
Downloads
2
Maintainers
Readme
install package
npm install @lvenkatesh6526/password-decrypt-encrypt-node
use below example to generate unique password and valiadate the unique password
const add =require("password-decrypt-encrypt-node")
const originalPassword = '123456';
add.generateHashedPassword(originalPassword) .then((hashedPassword) => { console.log('Generated Hash:', hashedPassword);
const enteredPassword = '123456';
add.verifyPassword(enteredPassword, hashedPassword)
.then((isMatch) => {
if (isMatch) {
console.log('Password Matched! Login Successful.');
} else {
console.log('Password Mismatch! Login Failed.');
}
})
.catch((error) => {
console.error('Error:', error.message);
});
}) .catch((error) => { console.error('Error:', error.message); });