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

x/scrypt/lib/helpers.ts>formatPHC

🔑 Deno library for hashing passwords using scrypt
Go to Latest
function formatPHC
import { formatPHC } from "https://deno.land/x/scrypt@v4.1.1/lib/helpers.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