Completed
Push — master ( a70ca1...835655 )
by Jafar
06:00
created

RS256::getHashingAlgorithm()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 1
nc 2
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
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
namespace Jafar\Bundle\GuardedAuthenticationBundle\Api\JWTSigner\Signer\OpenSSL;
11
12
/**
13
 * Class RS256.
14
 *
15
 * @author Jafar Jabr <[email protected]>
16
 */
17
class RS256 extends RSA
18
{
19
    public function getHashingAlgorithm()
20
    {
21
        return version_compare(phpversion(), '5.4.8', '<') ? 'SHA256' : OPENSSL_ALGO_SHA256;
22
    }
23
}
24