π‘ Easy password hashing and verification in Node. Protects against brute force, rainbow tables, and timing attacks.
$ npm install --save credential-plus
const credential = require('credential-plus');
// Coming soon.
Creates a new 'unique' hash from a password.
Type: string
The password to hash.
Type: object
Configurations for the hash function.
Type: string
Default: 'pbkdf2'
The name of the hash function to use.
Can be one of: 'pbkdf2'
, 'bcrypt'
, 'scrypt'
,'argon2'
Options available are different for each hash function. See here the list.
Type: function
Called after the hash has been computed.
Type: object
Possible error thrown.
Type: object
Stringified hash object that holds the generated hash string, the name of the function used and the parameters passed to the hash funciton needed for the verification process.
Determines whether or not the user's input matches the stored password.
Type: string
Stringified hash object generated from this package.
Type: string
User's input input.
Type: string
Called after the verification process has been computed.
Type: object
Possible error thrown.
Type: boolean
True if the hash computed for the input matches.
Type: number
Default: 10000
Description
Type: number
Default: 128
Description
Type: string
Default: 'sha512'
Description
Type: number
Default: 10
Description
Type: number
Default: 0.15
Description
Type: number
Default: 0
Description
Type: number
Default: 0.5
Description
Type: number
Default: 0
Description
Type: number
Default: 3
Description
Type: number
Default: 12
Description
Type: number
Default: 1
Description
Type: number
Default: 32
Description
- Simone Primarosa - simonepri
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details.