Passed
Push — master ( 90db0f...396226 )
by Jafar
03:16
created

RS256   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A getHashingAlgorithm() 0 3 2
1
<?php
2
/*
3
 * This file is part of the Guarded Authentication package.
4
 *
5
 * (c) Jafar Jabr <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Jafar\Bundle\GuardedAuthenticationBundle\Api\JWTSigner\Signer\OpenSSL;
12
13
/**
14
 * Class RS256.
15
 *
16
 * @author Jafar Jabr <[email protected]>
17
 */
18
class RS256 extends RSA
19
{
20
    public function getHashingAlgorithm()
21
    {
22
        return version_compare(phpversion(), '5.4.8', '<') ? 'SHA256' : OPENSSL_ALGO_SHA256;
23
    }
24
}
25