Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
Module

x/scrypt/lib/format.ts>formatScrypt

๐Ÿ”‘ Deno library for hashing passwords using scrypt
Go to Latest
function formatScrypt
import { formatScrypt } from "https://deno.land/x/scrypt@v4.4.1/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