Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @stablelib/scrypt

Index

Functions

  • deriveKey(password: Uint8Array, salt: Uint8Array, N: number, r: number, p: number, dkLen: number): Uint8Array
  • Derives a key from password and salt with parameters N — CPU/memory cost, r — block size, p — parallelization, containing dkLen bytes.

    Parameters

    • password: Uint8Array
    • salt: Uint8Array
    • N: number
    • r: number
    • p: number
    • dkLen: number

    Returns Uint8Array

  • deriveKeyNonBlocking(password: Uint8Array, salt: Uint8Array, N: number, r: number, p: number, dkLen: number): Promise<Uint8Array>
  • Same as deriveKey, but performs calculation in a non-blocking way, making sure to not take more than 100 ms per blocking calculation.

    Parameters

    • password: Uint8Array
    • salt: Uint8Array
    • N: number
    • r: number
    • p: number
    • dkLen: number

    Returns Promise<Uint8Array>

Generated using TypeDoc