SignatureAlgorithm   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 31
c 0
b 0
f 0
wmc 1
lcom 0
cbo 1
ccs 5
cts 5
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
1
<?php
2
3
namespace Fhp\DataElementGroups;
4
5
use Fhp\Deg;
6
7
/**
8
 * Class SignatureAlgorithm.
9
 * @package Fhp\DataElementGroups
10
 */
11
class SignatureAlgorithm extends Deg
12
{
13
    const SIG_ALGO_USAGE_OSG = 6; // Owner Signing (OSG)
14
15
    const SIG_ALGO_DES = 1;
16
    const SIG_ALGO_RSA = 10;
17
18
    const OPERATION_MODE_CBC = 2;
19
    const OPERATION_MODE_ISO_9796_1 = 16;
20
    const OPERATION_MODE_ISO_9796_2 = 17;
21
    const OPERATION_MODE_RSASSA_PKCS_RSAES_PKCS = 18;
22
    const OPERATION_MODE_RSASSA_PSS = 19;
23
    const OPERATION_MODE_999 = 999;
24
25
    /**
26
     * SignatureAlgorithm constructor.
27
     *
28
     * @param int $sigAlgoUsage
29
     * @param int $sigAlgo
30
     * @param int $operationMode
31
     */
32 5
    public function __construct(
33
        $sigAlgoUsage = self::SIG_ALGO_USAGE_OSG,
34
        $sigAlgo = self::SIG_ALGO_RSA,
35
        $operationMode = self::OPERATION_MODE_ISO_9796_1
36
    ) {
37 5
        $this->addDataElement($sigAlgoUsage);
38 5
        $this->addDataElement($sigAlgo);
39 5
        $this->addDataElement($operationMode);
40 5
    }
41
}
42