Total Complexity | 3 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class PemPrivateKeySerializer implements PrivateKeySerializerInterface |
||
14 | { |
||
15 | /** |
||
16 | * @var DerPrivateKeySerializer |
||
17 | */ |
||
18 | private $derSerializer; |
||
19 | |||
20 | /** |
||
21 | * @param DerPrivateKeySerializer $derSerializer |
||
22 | */ |
||
23 | public function __construct(DerPrivateKeySerializer $derSerializer) |
||
24 | { |
||
25 | $this->derSerializer = $derSerializer; |
||
26 | } |
||
27 | |||
28 | /** |
||
29 | * {@inheritDoc} |
||
30 | * @see \Mdanter\Ecc\Serializer\PrivateKey\PrivateKeySerializerInterface::serialize() |
||
31 | */ |
||
32 | public function serialize(PrivateKeyInterface $key): string |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * {@inheritDoc} |
||
45 | * @see \Mdanter\Ecc\Serializer\PrivateKey\PrivateKeySerializerInterface::parse() |
||
46 | */ |
||
47 | public function parse(string $formattedKey): PrivateKeyInterface |
||
55 | } |
||
56 | } |
||
57 |