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

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

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

Check if a plaintext password matches a hash Requires the --allow-net flag

Parameters

plaintext: string

The plaintext password to check

hash: string

The hash to compare to

Returns

Promise<boolean>

Whether the password matches the hash