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.

Code Duplication    Length = 43-44 lines in 3 locations

src/jwa/cryptographic_algorithms/key_management/rsa/OAEP/RSA_OAEP_256_KeyManagementAlgorithm.php 1 location

@@ 21-63 (lines=43) @@
18
 * Class RSA_OAEP_256_KeyManagementAlgorithm
19
 * @package jwa\cryptographic_algorithms\key_management\rsa\OAEP
20
 */
21
final class RSA_OAEP_256_KeyManagementAlgorithm extends RSA_KeyManagementAlgorithm {
22
23
    /**
24
     * @return string
25
     */
26
    public function getHashingAlgorithm()
27
    {
28
        return 'sha256';
29
    }
30
31
    /**
32
     * @return string
33
     */
34
    public function getName()
35
    {
36
        return JSONWebSignatureAndEncryptionAlgorithms::RSA_OAEP_256;
37
    }
38
39
    /**
40
     * @return int
41
     */
42
    public function getEncryptionMode()
43
    {
44
        return RSA::ENCRYPTION_OAEP;
45
    }
46
47
    /**
48
     * @return string
49
     */
50
    public function getMGFHash()
51
    {
52
        return $this->getHashingAlgorithm();
53
    }
54
55
    /**
56
     * hash key size in bits
57
     * @return int
58
     */
59
    public function getHashKeyLen()
60
    {
61
        return 256;
62
    }
63
}

src/jwa/cryptographic_algorithms/key_management/rsa/OAEP/RSA_OAEP_KeyManagementAlgorithm.php 1 location

@@ 21-63 (lines=43) @@
18
 * Class RSA_OAEP_KeyManagementAlgorithm
19
 * @package jwa\cryptographic_algorithms\key_management\rsa\OAEP
20
 */
21
final class RSA_OAEP_KeyManagementAlgorithm extends RSA_KeyManagementAlgorithm {
22
23
    /**
24
     * @return string
25
     */
26
    public function getHashingAlgorithm()
27
    {
28
        return 'sha1';
29
    }
30
31
    /**
32
     * @return string
33
     */
34
    public function getName()
35
    {
36
        return JSONWebSignatureAndEncryptionAlgorithms::RSA_OAEP;
37
    }
38
39
    /**
40
     * @return int
41
     */
42
    public function getEncryptionMode()
43
    {
44
        return RSA::ENCRYPTION_OAEP;
45
    }
46
47
    /**
48
     * @return string
49
     */
50
    public function getMGFHash()
51
    {
52
        return $this->getHashingAlgorithm();
53
    }
54
55
    /**
56
     * hash key size in bits
57
     * @return int
58
     */
59
    public function getHashKeyLen()
60
    {
61
        return 1;
62
    }
63
}

src/jwa/cryptographic_algorithms/key_management/rsa/PKCS1/RSA1_5_KeyManagementAlgorithm.php 1 location

@@ 21-64 (lines=44) @@
18
 * Class RSA1_5_KeyManagementAlgorithm
19
 * @package jwa\cryptographic_algorithms\key_management\rsa\PKCS1
20
 */
21
final class RSA1_5_KeyManagementAlgorithm extends RSA_KeyManagementAlgorithm
22
{
23
24
    /**
25
     * @return string
26
     */
27
    public function getHashingAlgorithm()
28
    {
29
        return 'sha1';
30
    }
31
32
    /**
33
     * @return string
34
     */
35
    public function getName()
36
    {
37
        return JSONWebSignatureAndEncryptionAlgorithms::RSA1_5;
38
    }
39
40
    /**
41
     * @return int
42
     */
43
    public function getEncryptionMode()
44
    {
45
        return RSA::ENCRYPTION_PKCS1;
46
    }
47
48
    /**
49
     * @return string
50
     */
51
    public function getMGFHash()
52
    {
53
        return $this->getHashingAlgorithm();
54
    }
55
56
    /**
57
     * hash key size in bits
58
     * @return int
59
     */
60
    public function getHashKeyLen()
61
    {
62
        return 1;
63
    }
64
}