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

x/scrypt/lib/format.ts>formatPHC

๐Ÿ”‘ Deno library for hashing passwords using scrypt
Go to Latest
function formatPHC
import { formatPHC } from "https://deno.land/x/scrypt@v4.4.1/lib/format.ts";

Format hash as a PHC format string (a stricter subset of Modular Crypt Format created for argon2) This format is fully compatible with MCF and this implementation is based on passlib Salt and hash are saved as base64 encoded strings without padding

Parameters

rawHash: string
  • base64 formatted hash
logN: logN
  • log2 of cost factor
r: number
  • block size
p: number
  • parallelism factor
salt: string | Uint8Array
  • salt used when hashing

Returns

string