Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/scrypt/lib/format.ts>formatScrypt

🔑 Deno library for hashing passwords using scrypt
Latest
function formatScrypt
import { formatScrypt } from "https://deno.land/x/scrypt@v4.4.4/lib/format.ts";

Format hash using HMAC-based format from node-scrypt based on the original tarsnap scrypt encrypted data format

Parameters

rawHash: string
  • Raw scrypt hash in base64 format
logN: logN
  • The log2 of the cost factor
r: number
  • Block size
p: number
  • Parallelism factor
salt: string | Uint8Array
  • Salt used

Returns

string
  • hash in original scrypt format as a base64 string