Failed Conditions
Push — v7 ( a687dc...e264c8 )
by Florent
02:28
created

CurveParameters::getB()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Jose\Component\Core\Util\Ecc\Primitives;
4
5
final class CurveParameters
6
{
7
    /**
8
     * Elliptic curve over the field of integers modulo a prime.
9
     *
10
     * @var \GMP
11
     */
12
    protected $a;
13
14
    /**
15
     *
16
     * @var \GMP
17
     */
18
    protected $b;
19
20
    /**
21
     *
22
     * @var \GMP
23
     */
24
    protected $prime;
25
26
    /**
27
     * Binary length of keys associated with these curve parameters
28
     *
29
     * @var int
30
     */
31
    protected $size;
32
33
    /**
34
     * @param int $size
35
     * @param \GMP $prime
36
     * @param \GMP $a
37
     * @param \GMP $b
38
     */
39
    public function __construct($size, \GMP $prime, \GMP $a, \GMP $b)
40
    {
41
        $this->size = $size;
42
        $this->prime = $prime;
43
        $this->a = $a;
44
        $this->b = $b;
45
    }
46
47
    /**
48
     * @return \GMP
49
     */
50
    public function getA()
51
    {
52
        return $this->a;
53
    }
54
55
    /**
56
     * @return \GMP
57
     */
58
    public function getB()
59
    {
60
        return $this->b;
61
    }
62
63
    /**
64
     * @return \GMP
65
     */
66
    public function getPrime()
67
    {
68
        return $this->prime;
69
    }
70
71
    /**
72
     * @return int
73
     */
74
    public function getSize()
75
    {
76
        return $this->size;
77
    }
78
}
79