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 passphrase
string Passphrase to be used for the derived key. salt
string <optional>
'' Salt value. options
Object <optional>
Optional options object. (Parameter descriptions below) Properties
Name Type Argument Default Description return_format
number <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 options
Object <optional>
{} Optional options object. (Parameter descriptions below) Properties
Name Type Argument Default Description key_size
number <optional>
32 The key size to generate. Must be a multiple of 4. hasher
Hasher <optional>
SHA1 The class name of a hasher. iterations
number <optional>
1 Number of iterations to HMAC hash key data. - Inherited From:
- Source:
Returns:
This initialized instance- Type
- PBKDF2