-
Notifications
You must be signed in to change notification settings - Fork 32
/
evpkdf.d.ts
36 lines (33 loc) · 925 Bytes
/
evpkdf.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import {
Base,
WordArray,
KDFCfg,
KDFFn,
} from './core';
/**
* This key derivation function is meant to conform with EVP_BytesToKey.
* www.openssl.org/docs/crypto/EVP_BytesToKey.html
*/
export class EvpKDFAlgo extends Base {
static create(cfg?: KDFCfg): EvpKDFAlgo;
constructor(cfg?: KDFCfg);
compute(password?: WordArray | string, salt?: WordArray | string): WordArray;
}
/**
* Derives a key from a password.
*
* @param {WordArray|string} password The password.
* @param {WordArray|string} salt A salt.
* @param {Object} cfg (Optional) The configuration options to use for this computation.
*
* @return {WordArray} The derived key.
*
* @static
*
* @example
*
* var key = CryptoJS.EvpKDF(password, salt);
* var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 });
* var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 });
*/
export const EvpKDF: KDFFn;