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-argon2

2.0.3 • Public • Published

credential-plus-argon2


🛡 Argon2 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-argon2

Usage

const credential = require('credential-plus');
credential.install(require('credential-plus-argon2'));
 
// Hash and verify with argon2 and default configs
credential.hash('We are all unicorns', {func: 'argon2'})
  .then(hash) => {
 
    console.log(hash);
    //=> {"hash":"$argon2d$v=19$m=4096,t=3,p=1$i5VhaDYfYqSWWoG1uKVBbw$QHpzhFRYJZwIcogtSciXh0hbc8f91PyGBdtWSNocuiE","func":"argon2"}
 
    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-argon2

Weekly Downloads

1

Version

2.0.3

License

MIT

Unpacked Size

7.09 kB

Total Files

4

Last publish

Collaborators

  • simonepri