new EVPKDF(data)
Creates a new EVPKDF instance
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Object | Initialization options for the class, passed automatically into PBKDF2#initialize. Note this class will ignore your choice of hash algorithm and always use MD5. |
Extends
Requires
- module:convert
Methods
-
compute(passphrase, salt, options) → {string|Array}
-
Derives a EVPKDF key from a given passphrase and salt value
Parameters:
Name Type Argument Default Description passphrasestring Passphrase to be used for the derived key. saltstring <optional>
'' Salt value. optionsObject <optional>
Optional options object. (Parameter descriptions below) Properties
Name Type Argument Default Description return_formatnumber <optional>
'hex' (binary|hex|words) The return format. Returns:
A string or Array depending on options.- Type
- string | Array
-
initialize(options) → {PBKDF2}
-
Initializes the PBKDF2 instance
Parameters:
Name Type Argument Default Description optionsObject <optional>
{} Optional options object. (Parameter descriptions below) Properties
Name Type Argument Default Description key_sizenumber <optional>
32 The key size to generate. Must be a multiple of 4. hasherHasher <optional>
SHA1 The class name of a hasher. iterationsnumber <optional>
1 Number of iterations to HMAC hash key data. - Inherited From:
- Source:
Returns:
This initialized instance- Type
- PBKDF2