Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface PasswordHashingAlgorithm

Algorithm used for password hashing.

Hierarchy

  • PasswordHashingAlgorithm

Implemented by

Methods

Methods

hash

  • Hashes password.

    Parameters

    • password: string

      Plaintext password.

    Returns Promise<PasswordHash>

    Password hash.

verify

  • verify(plain: string, hash: string, salt?: null | string): Promise<boolean>
  • Verifies password.

    Parameters

    • plain: string

      Plaintext password.

    • hash: string

      Password hash.

    • Optional salt: null | string

      Password salt.

    Returns Promise<boolean>

    Whether password is valid.