GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 59f4b4...e271c1 )
by Joni
03:51
created

PBES2HS512A256KWAlgorithm   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
eloc 5
dl 0
loc 32
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A algorithmParamValue() 0 3 1
A _hashAlgo() 0 3 1
A _kwAlgo() 0 3 1
A _keyLength() 0 3 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Sop\JWX\JWE\KeyAlgorithm;
6
7
use Sop\AESKW\AESKeyWrapAlgorithm;
8
use Sop\AESKW\AESKW256;
9
use Sop\JWX\JWA\JWA;
10
11
/**
12
 * Implements PBES2 with HMAC SHA-512 and "A256KW" wrapping.
13
 *
14
 * @see https://tools.ietf.org/html/rfc7518#section-4.8
15
 */
16
class PBES2HS512A256KWAlgorithm extends PBES2Algorithm
17
{
18
    /**
19
     * {@inheritdoc}
20
     */
21 4
    public function algorithmParamValue(): string
22
    {
23 4
        return JWA::ALGO_PBES2_HS512_A256KW;
24
    }
25
26
    /**
27
     * {@inheritdoc}
28
     */
29 3
    protected function _hashAlgo(): string
30
    {
31 3
        return 'sha512';
32
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37 3
    protected function _keyLength(): int
38
    {
39 3
        return 32;
40
    }
41
42
    /**
43
     * {@inheritdoc}
44
     */
45 4
    protected function _kwAlgo(): AESKeyWrapAlgorithm
46
    {
47 4
        return new AESKW256();
48
    }
49
}
50