Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Argon2PasswordHashingAlgorithm

Password hashing algorithm using argon2.

Hierarchy

  • Argon2PasswordHashingAlgorithm

Implements

Constructors

Methods

Constructors

constructor

  • new Argon2PasswordHashingAlgorithm(hashingOptions: Readonly<Omit<RequireSome<Options, "hashLength" | "memoryCost" | "parallelism" | "type">, "version" | "salt" | "raw">>): Argon2PasswordHashingAlgorithm
  • Parameters

    • hashingOptions: Readonly<Omit<RequireSome<Options, "hashLength" | "memoryCost" | "parallelism" | "type">, "version" | "salt" | "raw">>

    Returns Argon2PasswordHashingAlgorithm

Methods

hash

verify

  • verify(plainPassword: string, hashedPassword: string): Promise<boolean>
  • Verifies password.

    Parameters

    • plainPassword: string
    • hashedPassword: string

    Returns Promise<boolean>