TripleDES::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 5
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\XMLSecurity\Alg\Encryption;
6
7
use SimpleSAML\XMLSecurity\Constants as C;
8
use SimpleSAML\XMLSecurity\Key\SymmetricKey;
9
10
/**
11
 * Class implementing the 3DES encryption algorithm.
12
 *
13
 * @package simplesamlphp/xml-security
14
 */
15
class TripleDES extends AbstractEncryptor
16
{
17
    /**
18
     * 3DES constructor.
19
     *
20
     * @param \SimpleSAML\XMLSecurity\Key\SymmetricKey $key The symmetric key to use.
21
     */
22
    public function __construct(
23
        #[\SensitiveParameter]
24
        SymmetricKey $key,
25
    ) {
26
        parent::__construct($key, C::BLOCK_ENC_3DES);
27
    }
28
29
30
    /**
31
     * @return string[]
32
     */
33
    public static function getSupportedAlgorithms(): array
34
    {
35
        return [C::BLOCK_ENC_3DES];
36
    }
37
}
38