Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | /** |
3 | * |
4 | * This file is part of the phpBB Forum Software package. |
5 | * |
6 | * @copyright (c) phpBB Limited <https://www.phpbb.com> |
7 | * @license GNU General Public License, version 2 (GPL-2.0) |
8 | * |
9 | * For full copyright and license information, please see |
10 | * the docs/CREDITS.txt file. |
11 | * |
12 | */ |
13 | |
14 | namespace phpbb\passwords\driver; |
15 | |
16 | interface driver_interface |
17 | { |
18 | /** |
19 | * Check if hash type is supported |
20 | * |
21 | * @return bool True if supported, false if not |
22 | */ |
23 | public function is_supported(); |
24 | |
25 | /** |
26 | * Check if hash type is a legacy hash type |
27 | * |
28 | * @return bool True if it's a legacy hash type, false if not |
29 | */ |
30 | public function is_legacy(); |
31 | |
32 | /** |
33 | * Returns the hash prefix |
34 | * |
35 | * @return string Hash prefix |
36 | */ |
37 | public function get_prefix(); |
38 | |
39 | /** |
40 | * Hash the password |
41 | * |
42 | * @param string $password The password that should be hashed |
43 | * |
44 | * @return bool|string Password hash or false if something went wrong |
45 | * during hashing |
46 | */ |
47 | public function hash($password); |
48 | |
49 | /** |
50 | * Check the password against the supplied hash |
51 | * |
52 | * @param string $password The password to check |
53 | * @param string $hash The password hash to check against |
54 | * @param array $user_row User's row in users table |
55 | * |
56 | * @return bool True if password is correct, else false |
57 | */ |
58 | public function check($password, $hash, $user_row = array()); |
59 | |
60 | /** |
61 | * Get only the settings of the specified hash |
62 | * |
63 | * @param string $hash Password hash |
64 | * @param bool $full Return full settings or only settings |
65 | * related to the salt |
66 | * @return string|false String containing the hash settings or false if settings are empty or not supported |
67 | */ |
68 | public function get_settings_only($hash, $full = false); |
69 | } |