Hash

A hash implementation for encrypting passwords.

Available:

  • Bcrypt

  • Fake

Methods:

GenerateHash: Generates a hash of your keyword.

const password = '12345';

const data = await this.hashProvider.generateHash(password);

CompareHash: Compares the entered keyword to a previously generated hash.

const password = '12345';

const data = await this.hashProvider.compareHash(
  password,
  '$2b$10$NuU6SnBESq6DeNrLZ6/NEuj6jFgESyQkKluK6hJjPF8DFJNerO/Y6',
);

Last updated