Skip to main content

BcryptPasswordHashingStrategy

BcryptPasswordHashingStrategy

A hashing strategy which uses bcrypt (https://en.wikipedia.org/wiki/Bcrypt) to hash plaintext password strings.

Signature
class BcryptPasswordHashingStrategy implements PasswordHashingStrategy {
hash(plaintext: string) => Promise<string>;
check(plaintext: string, hash: string) => Promise<boolean>;
}

hash

method
(plaintext: string) => Promise<string>

check

method
(plaintext: string, hash: string) => Promise<boolean>