Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/justaos_utils/packages/common-utils/deps.ts>bcrypt.hash

Common utility functions used across projects
Go to Latest
function bcrypt.hash
import { bcrypt } from "https://deno.land/x/justaos_utils@v1.9.0/packages/common-utils/deps.ts";
const { hash } = bcrypt;

Generate a hash for the plaintext password Requires the --allow-net flag

Parameters

plaintext: string

The password to hash

optional
salt: string | undefined = [UNSUPPORTED]

The salt to use when hashing. Recommended to leave this undefined.

Returns

Promise<string>

The hashed password