Constructor
new SalmonDefaultPbkdfProvider()
Methods
(async) getKey(password, salt, iterations, outputBytes, pbkdfAlgo) → {Promise.<Uint8Array>}
Get a key derived from a text password
Parameters:
Name | Type | Description |
---|---|---|
password |
string | The text password. |
salt |
Uint8Array | The salt needs to be at least 24 bytes. |
iterations |
number | Iterations to use. Make sure you use a high number according to your hardware specs. |
outputBytes |
number | The length of the output key. |
pbkdfAlgo |
PbkdfAlgo | The hash algorithm to use. |
Throws:
SalmonSecurityException Thrown when error with security
Returns:
The key.
- Type
- Promise.<Uint8Array>