Crate bcrypt

source ·
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.
  • Verify that a password is equivalent to the hash provided

Type Aliases§