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

x/bcrypt/src/main.ts>compareSync

A port of jBCrypt to TypeScript for use as a Deno module
Latest
function compareSync
import { compareSync } from "https://deno.land/x/bcrypt@v0.4.1/src/main.ts";

Check if a plaintext password matches a hash This function is blocking and computationally expensive but requires no additonal flags. Using the async variant is highly recommended.

Parameters

plaintext: string

The plaintext password to check

hash: string

The hash to compare to

Returns

boolean

Whether the password matches the hash