Module hash

Module hash 

Source
Expand description

Native password hash verification for Apache htpasswd formats.

Supported formats:

  • bcrypt ($2y$, $2a$, $2b$)
  • APR1 MD5 ($apr1$)
  • SHA1 ({SHA})
  • Plain text (fallback)

Functionsยง

constant_time_eq
Constant-time byte comparison to prevent timing attacks. Does not leak length information through timing.
verify
Verifies a password against a stored hash. Automatically detects the hash format and uses the appropriate algorithm.