GeneratePBKDFkey()
Implementation of Password-Based Key-Derivation Function (PBKDF).
Introduced: 5.0.0.0
GeneratePBKDFkey( algorithm=string, passphrase=string, salt=string, iterations=numeric, keySize=numeric );
Returns: String
| Argument | Description | Default |
|---|---|---|
|
algorithm
string,
required
|
edit
Hashing algorithm used for generating key Example Values:
|
|
|
passphrase
string,
required
|
edit
Passphrase to be hashed. |
|
|
salt
string,
required
|
edit
A random salt. It is recommended that you used something like the |
|
|
iterations
numeric,
optional
|
edit
The number of PBKDF iterations to perform. A minimum recommended value is 1000, however a value between 50,000 and 100,000 is recommended. You can also make this a random value, using something like the |
4096 |
|
keySize
numeric,
optional
|
edit
The length in bytes of the key to generate. |
128 |
Examples
edit dump(generatePBKDFKey("PBKDF2WithHmacSHA1", "secret", "salty", 5000, 128));// Y0MCpCe3zb0CNJvyXNUWEQ==
See also
- Cryptography
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)