Class BcryptPasswordHasher

Assembly: redb.Core.dll

Password hasher using BCrypt (recommended for production).
Backward-compatible: can verify legacy SHA256+salt hashes from .
New passwords are always hashed with BCrypt.

public class BcryptPasswordHasher : IPasswordHasher

Inheritance

Object→BcryptPasswordHasher

Implements

Methods

HashPassword(string)

Hash a plain-text password.

public string HashPassword(string password)

NeedsRehash(string)

Checks whether the stored hash is in legacy SHA256 format and needs rehashing to BCrypt.

public static bool NeedsRehash(string hashedPassword)

VerifyPassword(string, string)

Verify a password against a hash.

public bool VerifyPassword(string password, string hashedPassword)

Constructors

BcryptPasswordHasher(int)

Creates a BCrypt password hasher.