Skip to content
This repository has been archived by the owner on Sep 6, 2024. It is now read-only.

Latest commit

 

History

History
56 lines (34 loc) · 1.21 KB

Pbkdf2.md

File metadata and controls

56 lines (34 loc) · 1.21 KB

Class: Pbkdf2

Implementation of the password based key derivation function 2.

Table of contents

Methods

Methods

sha256

Static sha256(password, salt, iterations, keyLength): Uint8Array

Derive a key from the parameters using Sha256.

Parameters

Name Type Description
password Uint8Array The password to derive the key from.
salt Uint8Array The salt for the derivation.
iterations number Numer of iterations to perform.
keyLength number The length of the key to derive.

Returns

Uint8Array

The derived key.


sha512

Static sha512(password, salt, iterations, keyLength): Uint8Array

Derive a key from the parameters using Sha512.

Parameters

Name Type Description
password Uint8Array The password to derive the key from.
salt Uint8Array The salt for the derivation.
iterations number Numer of iterations to perform.
keyLength number The length of the key to derive.

Returns

Uint8Array

The derived key.