1.1.0 • Published 7 years ago
password_hash v1.1.0
password_hash
a Node version of php's password_hash
Generating a Salt
password_hash().salt([Optional] saltSize);
saltSize
: number of bytes (optional, default=16)
Hashing a Password
password_hash(password).hash(salt, [Optional] iterations, [Optional] keylen);
password
: plaintext password to hash
salt
: salt to use for hash
iterations
: number of iterations to hash (optional, default=1000)
keylen
: number of bytes (optional, default=64)
Verifying a Password
password_hash(password).verify(pack);
password
: plaintext password to verify
pack
: the hashed password and info returned from .hash(...);