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.2.0/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
optional
outputEncoding: encoding

Returns

Uint8Array | string
  • the resulting hash encoded according to outputEncoding