credential-plus-bcrypt

2.0.3 • Public • Published

credential-plus-bcrypt


🛡 BCrypt password hashing function for credential-plus.
If you find a security flaw in this code, PLEASE report it.

DEPRECATED!!! USE upash INSTEAD


Install

$ npm install --save credential-plus-bcrypt

Usage

const credential = require('credential-plus');
credential.install(require('credential-plus-bcrypt'));
 
// Hash and verify with bcrypt and default configs
credential.hash('We are all unicorns', {func: 'bcrypt'})
  .then(hash) => {
 
    console.log(hash);
    //=> {"hash":"$2a$10$fxxhS75tSP7sP/8UNNJs8uspHSfusSCafU.EhTsn15ENdm/9n3IQe","func":"bcrypt"}
 
    credential.verify(hash, 'We are all unicorns')
      .then(match) => {
        console.log(match);
        //=> true
      });
 
  });

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details.

/credential-plus-bcrypt/

    Package Sidebar

    Install

    npm i credential-plus-bcrypt

    Weekly Downloads

    0

    Version

    2.0.3

    License

    MIT

    Unpacked Size

    6.73 kB

    Total Files

    4

    Last publish

    Collaborators

    • simonepri