Options
All
  • Public
  • Public/Protected
  • All
Menu

Class HashingStrategy

Hashing Strategy manager.

This class will load system provided hashing strategies and algorithms.

Hierarchy

  • HashingStrategy

Index

Methods

Methods

get

  • Get an algorithm interface by its Id

    Parameters

    • id: string

    Returns HashingAlgorithm

hash

  • hash(id: string, params: {}, salt: string, password: string): string
  • Hashes a password.

    Parameters

    • id: string
    • params: {}
      • [key: string]: string
    • salt: string
    • password: string

    Returns string

put

  • Put or replace an algorithm into the list of system loaded algorithms.

    Parameters

    Returns HashingStrategy

verify

  • verify(hash: string, password: string): boolean
  • Time constant password check. Regardless of the check, this algorithm executes the same number of checks regardless of the correctly number of characters

    Parameters

    • hash: string
    • password: string

    Returns boolean

Static load

  • Factory method to load the algorithms from the system

    Returns HashingStrategy

Generated using TypeDoc