# @types/scrypt

> TypeScript definitions for scrypt

Latest version **6.0.3** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/scrypt
pnpm add @types/scrypt
yarn add @types/scrypt
bun add @types/scrypt
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 6.0.3 |
| Published | 2023-11-07 |
| First published | 2018-08-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51451 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/scrypt
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/scrypt
- npm.io page: https://npm.io/package/@types/scrypt

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) *

## Recent versions

- 6.0.3 (latest) — 2023-11-07
- 6.0.0 (ts2.0) — 2018-08-25
- 6.0.2 — 2023-10-18
- 6.0.1 — 2023-09-25

## README

# Installation
> `npm install --save @types/scrypt`

# Summary
This package contains type definitions for scrypt (https://github.com/barrysteyn/node-scrypt).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/scrypt.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/scrypt/index.d.ts)
````ts
/// <reference types="node" />

export interface Params {
    N: number;
    r: number;
    p: number;
}

export function params(maxtime: number, maxmem?: number, maxmemfrac?: number): Promise<Params>;
export function params(maxtime: number, cb: (err: Error | null, obj: Params) => void): void;
export function params(maxtime: number, maxmem: number, cb: (err: Error | null, obj: Params) => void): void;
export function params(
    maxtime: number,
    maxmem: number,
    maxmemfrac: number,
    cb: (err: Error | null, obj: Params) => void,
): void;
export function paramsSync(maxtime: number, maxmem?: number, maxmemfrac?: number): Params;

export function kdf(key: string | Buffer, paramsObject: Params): Promise<Buffer>;
export function kdf(key: string | Buffer, paramsObject: Params, cb: (err: Error | null, obj: Buffer) => void): void;
export function kdfSync(key: string | Buffer, paramsObject: Params): Buffer;

export function verifyKdf(kdf: Buffer, key: string | Buffer): Promise<boolean>;
export function verifyKdf(kdf: Buffer, key: string | Buffer, cb: (err: Error | null, obj: boolean) => void): void;
export function verifyKdfSync(kdf: Buffer, key: string | Buffer): boolean;

export function hash(
    key: string | Buffer,
    params: Params,
    outputLength: number,
    salt: string | Buffer,
): Promise<Buffer>;
export function hash(
    key: string | Buffer,
    params: Params,
    outputLength: number,
    salt: string | Buffer,
    cb: (err: Error | null, obj: Buffer) => void,
): void;
export function hashSync(key: string | Buffer, params: Params, outputLength: number, salt: string | Buffer): Buffer;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [WhiteAbeLincoln](https://github.com/WhiteAbeLincoln).

---
_Source: https://npm.io/package/@types/scrypt · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
