[][src]Module passwords::hasher

Hash passwords.

Functions

bcrypt

Use bcrypt to hash a password (the null-terminated byte will not be added automatically) 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.

bcrypt_format

Use bcrypt to hash a password (the null-terminated byte will not be added automatically) whose length is not bigger than 72 bytes to 24 bytes data. The result will be in Modular Crypt Format. If the salt is not 16 bytes, it will be MD5 hashed first.

gen_salt

Generate a random 16-byte salt.

get_password_with_null_terminated_byte

Check the password and make it terminated with a null byte, 0u8.

identify_bcrypt

Identify a password (the null-terminated byte will not be added automatically) by using the bcrypt-hashed data we've stored before.

identify_bcrypt_format

Identify a password (the null-terminated byte will not be added automatically) by using the bcrypt-hashed data in Modular Crypt Format we've stored before.