pbkdf2.Options
The options for the pbkdf2 function.
Fields
| Name | Type | Description |
|---|---|---|
password | string | The input password or passphrase to derive a key from. Not limited in length, but longer passphrases are usually stronger. |
salt | string | A unique, random value added to the password before hashing.
Prevents rainbow table attacks.
Common size: 16 to `32 bytes. |
iterations | integer | nil | Number of hashing iterations, higher values make brute-force attacks harder.
Recommended minimums:
* 100,000+ for general applications.
* 300,000+ for secure storage (as of 2024 recommendations).
Default value: 4096 = 4096 |
length | integer | nil | Desired length of the derived key (in bytes).
Default value: 16 = 16 |
hash | crypto.HashClass | The hash algorithm class to use for the key derivation. |