Skip to main content
Module

x/bcrypt/mod.ts>compare

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

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