BcryptPasswordHashingStrategy

BcryptPasswordHashingStrategy

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

Signature

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

Implements

Members

constructor

method
type:
() => BcryptPasswordHashingStrategy

hash

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

check

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