pbkdf2
- Version 3.1.6
- Published
- 6 dependencies
- MIT license
Install
npm i pbkdf2yarn add pbkdf2pnpm add pbkdf2Overview
This library provides the functionality of PBKDF2 with the ability to use any supported hashing algorithm returned from crypto.getHashes()
Index
Functions
Functions
function pbkdf2
pbkdf2: { ( password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string, callback: (err: Error | null, derivedKey: Buffer) => void ): void; ( password: any, salt: any, iterations: number, keylen: number, callback: (err: Error, derivedKey: Buffer) => void ): void;};Asynchronously derives a key using PBKDF2.
Parameter password
The password to derive the key from.
Parameter salt
The cryptographic salt.
Parameter iterations
The number of iterations to perform.
Parameter keylen
The desired length of the derived key in bytes.
Parameter digest
The HMAC digest algorithm to use (e.g.
'sha1','sha256','sha512').Parameter callback
Called with
(err, derivedKey)upon completion.Asynchronously derives a key using PBKDF2, defaulting to
'sha1'digest.Parameter password
The password to derive the key from.
Parameter salt
The cryptographic salt.
Parameter iterations
The number of iterations to perform.
Parameter keylen
The desired length of the derived key in bytes.
Parameter callback
Called with
(err, derivedKey)upon completion.
function pbkdf2Sync
pbkdf2Sync: ( password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest?: string) => Buffer;Synchronously derives a key using PBKDF2.
Parameter password
The password to derive the key from.
Parameter salt
The cryptographic salt.
Parameter iterations
The number of iterations to perform.
Parameter keylen
The desired length of the derived key in bytes.
Parameter digest
The HMAC digest algorithm to use (defaults to
'sha1').Returns
The derived key as a Buffer.
Package Files (1)
Dependencies (6)
Dev Dependencies (15)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/pbkdf2.
- Markdown[](https://www.jsdocs.io/package/pbkdf2)
- HTML<a href="https://www.jsdocs.io/package/pbkdf2"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2249 ms. - Missing or incorrect documentation? Open an issue for this package.
