1.0.0 • Published 2 years ago

password-decrypt-encrypt-node v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

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); });