Total Complexity | 2 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
22 | abstract class PublicKey extends BufferedHash |
||
23 | { |
||
24 | /** |
||
25 | * @var string The private key |
||
26 | */ |
||
27 | private $key; |
||
28 | |||
29 | /** |
||
30 | * {@inheritdoc} |
||
31 | */ |
||
32 | final public function __construct(string $algorithm, string $path) |
||
33 | { |
||
34 | $keyPath = $path.'.pubkey'; |
||
35 | |||
36 | Assertion::file($keyPath); |
||
37 | Assertion::readable($keyPath); |
||
38 | |||
39 | $this->key = file_get_contents($keyPath); |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * {@inheritdoc} |
||
44 | */ |
||
45 | final protected function getKey(): string |
||
48 | } |
||
49 | } |
||
50 |