LegacyPasswordHasherSaltless   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 8
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A hash() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * Saito - The Threaded Web Forum
7
 *
8
 * @copyright Copyright (c) the Saito Project Developers
9
 * @link https://github.com/Schlaefer/Saito
10
 * @license http://opensource.org/licenses/MIT
11
 */
12
13
namespace App\Auth;
14
15
use Authentication\PasswordHasher\LegacyPasswordHasher;
16
use Cake\Utility\Security;
17
18
/**
19
 * Check legacy passwords but without using Cake's salt
20
 */
21
class LegacyPasswordHasherSaltless extends LegacyPasswordHasher
22
{
23
    /**
24
     * {@inheritDoc}
25
     */
26
    public function hash($password)
27
    {
28
        return Security::hash($password, $this->_config['hashType'], false);
29
    }
30
}
31