Total Complexity | 3 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | abstract class AsymmetricKey implements KeyInterface |
||
17 | { |
||
18 | /** |
||
19 | * Build a new key with $key as its material. |
||
20 | * |
||
21 | * @param \SimpleSAML\XMLSecurity\CryptoEncoding\PEM $material The associated key material. |
||
22 | */ |
||
23 | public function __construct( |
||
24 | protected PEM $material, |
||
25 | ) { |
||
26 | } |
||
27 | |||
28 | |||
29 | /** |
||
30 | * Return the key material associated with this key. |
||
31 | * |
||
32 | * @return string The key material. |
||
33 | */ |
||
34 | public function getMaterial(): string |
||
35 | { |
||
36 | return $this->material->string(); |
||
37 | } |
||
38 | |||
39 | |||
40 | /** |
||
41 | * Return the raw PEM-object associated with this key. |
||
42 | * |
||
43 | * @return \SimpleSAML\XMLSecurity\CryptoEncoding\PEM The raw material. |
||
44 | */ |
||
45 | public function getPEM(): PEM |
||
48 | } |
||
49 | } |
||
50 |