Issues (367)

app/Libraries/ShaHash/SHAHasher.php (1 issue)

Labels
Severity
1
<?php
2
3
4
namespace App\Libraries\ShaHash;
5
6
7
use Illuminate\Contracts\Hashing\Hasher as HasherContract;
8
use Illuminate\Hashing\HashManager;
9
10
class SHAHasher  extends HashManager implements HasherContract
11
{
12
13
14
    public function check($value, $hashedValue, array $options = [])
15
    {
16
        return password_verify ($value , $hashedValue);
17
    }
18
19
20
    public function make($value, array $options = [])
21
    {
22
        return password_hash($value,PASSWORD_DEFAULT,$options);
23
    }
24
25
26
27
28
    public function needsRehash($hashedValue, array $options = [])
29
    {
30
        return password_needs_rehash($hashedValue,$options);
0 ignored issues
show
$options of type array is incompatible with the type integer|null|string expected by parameter $algo of password_needs_rehash(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

30
        return password_needs_rehash($hashedValue,/** @scrutinizer ignore-type */ $options);
Loading history...
31
    }
32
33
34
    public function info($hashedValue)
35
    {
36
        // TODO: Implement info() method.
37
        return $hashedValue;
38
    }
39
40
}
41