credential-plus-scryptdeprecated

SCrypt password hashing function for credential-plus

Usage no npm install needed!

<script type="module">
  import credentialPlusScrypt from 'https://cdn.skypack.dev/credential-plus-scrypt';
</script>

README

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.