method PasswordHasher.prototype.hash
PasswordHasher.prototype.hash(secret: string): Promise<string>

Hash a secret (password) with a random salt.

Parameters

secret: string

The password to hash

Return Type

Promise<string>

Stored string in format pbkdf2$<iterations>$<salt>$<hash>

Usage

import { PasswordHasher } from "auth-plugin/src/index.ts";