Commit | Line | Data |
---|---|---|
14d4f286 S |
1 | <?php |
2 | /** | |
3 | * The standard Key Derivation Function interface | |
4 | * | |
5 | * PHP version 5.3 | |
6 | * | |
7 | * @category PHPCryptLib | |
8 | * @package Key | |
9 | * @subpackage Derivation | |
10 | * @author Anthony Ferrara <ircmaxell@ircmaxell.com> | |
11 | * @copyright 2011 The Authors | |
12 | * @license http://www.opensource.org/licenses/mit-license.html MIT Licenses | |
13 | * @version Build @@version@@ | |
14 | */ | |
15 | ||
16 | namespace CryptLib\Key\Derivation; | |
17 | ||
18 | /** | |
19 | * The standard Key Derivation Function interface | |
20 | * | |
21 | * @category PHPCryptLib | |
22 | * @package Key | |
23 | * @subpackage Derivation | |
24 | * @author Anthony Ferrara <ircmaxell@ircmaxell.com> | |
25 | * @codeCoverageIgnore | |
26 | */ | |
27 | interface KDF { | |
28 | ||
29 | /** | |
30 | * Derive a key of the specified length based on the inputted secret | |
31 | * | |
32 | * @param string $secret The secret to base the key on | |
33 | * @param int $length The length of the key to derive | |
34 | * @param string $other Additional data to append to the key | |
35 | * | |
36 | * @return string The generated key | |
37 | */ | |
38 | public function derive($secret, $length, $other = ''); | |
39 | ||
40 | } |