Module passwords::hasher

source ·
Expand description

Hash passwords.

Functions

Use bcrypt to hash a password whose length is not bigger than 72 bytes to 24 bytes data. If the salt is not 16 bytes, it will be MD5 hashed first.
Generate a random 16-byte salt.
Identify a plain text password by using the bcrypt-hashed data we’ve stored before.