This package has been deprecated

Author message:

This package has been replaced by @upash/universal. Migration instructions can be found here: https://github.com/simonepri/upash

credential-plus-scrypt

2.0.3 • Public • Published

credential-plus-scrypt


🛡 SCrypt 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-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.

Package Sidebar

Install

npm i credential-plus-scrypt

Weekly Downloads

3

Version

2.0.3

License

MIT

Unpacked Size

7.42 kB

Total Files

4

Last publish

Collaborators

  • simonepri