HashAlgorithm   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 HashAlgorithm.
9
 *
10
 * @package Fhp\DataElementGroups
11
 */
12
class HashAlgorithm extends Deg
13
{
14
    const HASH_ALGORITHM_USAGE_OHA = 1; // Owner Hashing (OHA)
15
16
    const HASH_ALGORITHM_SHA_1 = 1;
17
    const HASH_ALGORITHM_X = 2;
18
    const HASH_ALGORITHM_SHA_256 = 3;
19
    const HASH_ALGORITHM_SHA_384 = 4;
20
    const HASH_ALGORITHM_SHA_512 = 5;
21
    const HASH_ALGORITHM_SHA_256_256 = 6;
22
    const HASH_ALGORITHM_NEGOTIATE = 999;
23
24
    const HASH_ALGORITHM_PARAM_DESCRIPTION_IVC = 1;
25
26
    /**
27
     * HashAlgorithm constructor.
28
     *
29
     * @param int $hashAlgorithmUsage
30
     * @param int $hashAlgorithm
31
     * @param int $hashAlgorithmParamDescription
32
     */
33 5
    public function __construct(
34
        $hashAlgorithmUsage = self::HASH_ALGORITHM_USAGE_OHA,
35
        $hashAlgorithm = self::HASH_ALGORITHM_NEGOTIATE,
36
        $hashAlgorithmParamDescription = self::HASH_ALGORITHM_PARAM_DESCRIPTION_IVC
37
    ) {
38 5
        $this->addDataElement($hashAlgorithmUsage);
39 5
        $this->addDataElement($hashAlgorithm);
40 5
        $this->addDataElement($hashAlgorithmParamDescription);
41 5
    }
42
}
43