2.0.3 • Published 6 years ago

credential-plus-scrypt v2.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Install

$ npm install --save credential-plus-scrypt

Usage

const credential = require('credential-plus');
credential.install(require('credential-plus-scrypt'));

// Hash and verify with scrypt and default configs
credential.hash('We are all unicorns', {func: 'scrypt'})
  .then(hash) => {

    console.log(hash);
    //=> {"hash":"c2NyeXB0AA8AAAAIAAAAAdZuQumEF/m0V747VleWqvYZKhjOgXgQGtIsgOmLQwwc6KZuU2t1uEkqs9tABwGZyFHdCGkSxzpBLtMgx6UVtKwfcuRGKM2uGu1FvJt8avmU","func":"scrypt"}

    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.