Issues (311)

src/Alg/Encryption/TripleDES.php (1 issue)

Labels
Severity
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\XMLSecurity\Alg\Encryption;
6
7
use SimpleSAML\XMLSecurity\Constants as C;
0 ignored issues
show
The type SimpleSAML\XMLSecurity\Constants was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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