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

x/bcrypt/src/main.ts>hashSync

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

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

Parameters

plaintext: string

The password to hash

optional
salt: string | undefined = [UNSUPPORTED]

Returns

string

The hashed password