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

x/scrypt/lib/scrypt.ts>scrypt

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

Scrypt implementation using web assembly

Parameters

password: string | Uint8Array
  • string to hash
salt: string | Uint8Array
N: number
  • CPU/Memory cost parameter. Must be a power of 2 smaller than 2^(128*r/8)
r: number
  • block size
p: number
  • parallelism factor
optional
dklen: number
  • length (in bytes) of the output. Defaults to 32.
optional
outputEncoding: encoding
  • encoding used, defaults to null (Uint8Array)

Returns

Uint8Array | string
  • the resulting hash encoded according to outputEncoding