Completed
Push — master ( 6969ed...0fcf39 )
by Joao
11s queued 10s
created

JwtRsaKey::getAlghoritm()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace ByJG\Util;
4
5
class JwtRsaKey implements JwtKeyInterface
6
{
7
    protected $private;
8
    protected $public;
9
10
    /**
11
     * JwtRsaKey constructor.
12
     * @param $private
13
     * @param $public
14
     */
15
    public function __construct($private, $public)
16
    {
17
        $this->private = $private;
18
        $this->public = $public;
19
    }
20
21
    /**
22
     * @param $private
23
     * @param $public
24
     * @return JwtRsaKey
25
     */
26
    public static function getInstance($private, $public)
27
    {
28
        return new JwtRsaKey($private, $public);
29
    }
30
31
    public function getPublicKey()
32
    {
33
        return $this->public;
34
    }
35
36
    public function getPrivateKey()
37
    {
38
        return $this->private;
39
    }
40
41
    public function getAlghoritm()
42
    {
43
        return 'RS512';
44
    }
45
}
46