Verzeichnisstruktur phpBB-3.1.0
- Veröffentlicht
- 27.10.2014
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
sha1_wcf1.php
01 <?php
02 /**
03 *
04 * This file is part of the phpBB Forum Software package.
05 *
06 * @copyright (c) phpBB Limited <https://www.phpbb.com>
07 * @license GNU General Public License, version 2 (GPL-2.0)
08 *
09 * For full copyright and license information, please see
10 * the docs/CREDITS.txt file.
11 *
12 */
13
14 namespace phpbb\passwords\driver;
15
16 class sha1_wcf1 extends base
17 {
18 const PREFIX = '$wcf1$';
19
20 /**
21 * {@inheritdoc}
22 */
23 public function get_prefix()
24 {
25 return self::PREFIX;
26 }
27
28 /**
29 * {@inheritdoc}
30 */
31 public function is_legacy()
32 {
33 return true;
34 }
35
36 /**
37 * {@inheritdoc}
38 */
39 public function hash($password, $user_row = '')
40 {
41 // Do not support hashing
42 return false;
43 }
44
45 /**
46 * {@inheritdoc}
47 */
48 public function check($password, $hash, $user_row = array())
49 {
50 if (empty($hash) || strlen($hash) != 40 || !isset($user_row['user_passwd_salt']))
51 {
52 return false;
53 }
54 else
55 {
56 // Works for standard WCF 1.x, i.e. WBB3 and similar
57 return $this->helper->string_compare($hash, sha1($user_row['user_passwd_salt'] . sha1($user_row['user_passwd_salt'] . sha1($password))));
58 }
59 }
60 }
61