Implementation of the password based key derivation function 2.
▸ Static
sha256(password
, salt
, iterations
, keyLength
): Uint8Array
Derive a key from the parameters using Sha256.
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. |
Uint8Array
The derived key.
▸ Static
sha512(password
, salt
, iterations
, keyLength
): Uint8Array
Derive a key from the parameters using Sha512.
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. |
Uint8Array
The derived key.