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

CurveParameters   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 74
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 74
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getA() 0 4 1
A getB() 0 4 1
A getPrime() 0 4 1
A getSize() 0 4 1
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