Commit | Line | Data |
---|---|---|
14d4f286 S |
1 | <?php |
2 | /** | |
3 | * The core PBKDF interface (Password Based Key Derivation Function) | |
4 | * | |
5 | * This interface must be used to describe all derivation functions that take a | |
6 | * password as input and produce a key or hash as output | |
7 | * | |
8 | * PHP version 5.3 | |
9 | * | |
10 | * @category PHPCryptLib | |
11 | * @package Key | |
12 | * @subpackage Derivation | |
13 | * @author Anthony Ferrara <ircmaxell@ircmaxell.com> | |
14 | * @copyright 2011 The Authors | |
15 | * @license http://www.opensource.org/licenses/mit-license.html MIT License | |
16 | * @version Build @@version@@ | |
17 | */ | |
18 | ||
19 | namespace CryptLib\Key\Derivation; | |
20 | ||
21 | /** | |
22 | * The core PBKDF interface (Password Based Key Derivation Function) | |
23 | * | |
24 | * This interface must be used to describe all derivation functions that take a | |
25 | * password as input and produce a key or hash as output | |
26 | * | |
27 | * @category PHPCryptLib | |
28 | * @package Key | |
29 | * @subpackage Derivation | |
30 | * @author Anthony Ferrara <ircmaxell@ircmaxell.com> | |
31 | * @codeCoverageIgnore | |
32 | */ | |
33 | interface PBKDF { | |
34 | ||
35 | /** | |
36 | * Derive a key from the supplied arguments | |
37 | * | |
38 | * @param string $password The password to derive from | |
39 | * @param string $salt The salt string to use | |
40 | * @param int $iterations The number of iterations to use | |
41 | * @param int $length The size of the string to generate | |
42 | * | |
43 | * @return string The derived key | |
44 | */ | |
45 | public function derive($passkey, $salt, $iterations, $klen); | |
46 | ||
47 | /** | |
48 | * Get the signature for this implementation | |
49 | * | |
50 | * This should include all information needed to build the same isntance | |
51 | * later. | |
52 | * | |
53 | * @return string The signature for this instance | |
54 | */ | |
55 | public function getSignature(); | |
56 | ||
57 | } |