Skip to main content
Module

x/bcrypt/mod.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/mod.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