Expand description
Easily hash and verify passwords using bcrypt
Structs§
- A bcrypt hash result before concatenating
Enums§
- All the errors we can encounter while hashing/verifying passwords
- BCrypt hash version https://en.wikipedia.org/wiki/Bcrypt#Versioning_history
Constants§
Functions§
- Generates a password hash using the cost given. The salt is generated randomly using the OS randomness
- Generates a password hash using the cost given. The salt is generated randomly using the OS randomness. The function returns a result structure and allows to format the hash in different versions.
- Generates a password given a hash and a cost. The function returns a result structure and allows to format the hash in different versions.
- Generates a password hash using the cost given. The salt is generated randomly using the OS randomness Will return BcryptError::Truncation if password is longer than 72 bytes
- Generates a password hash using the cost given. The salt is generated randomly using the OS randomness. The function returns a result structure and allows to format the hash in different versions. Will return BcryptError::Truncation if password is longer than 72 bytes
- Generates a password given a hash and a cost. The function returns a result structure and allows to format the hash in different versions. Will return BcryptError::Truncation if password is longer than 72 bytes
- Verify that a password is equivalent to the hash provided. Only use this if you are only using
non_truncating_hash
to generate the hash. It will return an error for inputs that will work if generated from other sources. - Verify that a password is equivalent to the hash provided
Type Aliases§
- Library generic result type.