| 1 | <?php |
||
| 13 | class PrivateKeySerializer implements PrivateKeySerializerInterface |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var EcAdapter |
||
| 17 | */ |
||
| 18 | private $ecAdapter; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param EcAdapter $ecAdapter |
||
| 22 | */ |
||
| 23 | 150 | public function __construct(EcAdapter $ecAdapter) |
|
| 27 | |||
| 28 | /** |
||
| 29 | * @param PrivateKeyInterface $privateKey |
||
| 30 | * @return BufferInterface |
||
| 31 | */ |
||
| 32 | 104 | public function serialize(PrivateKeyInterface $privateKey) |
|
| 36 | |||
| 37 | /** |
||
| 38 | * @param Parser $parser |
||
| 39 | * @return PrivateKey |
||
| 40 | */ |
||
| 41 | 80 | public function fromParser(Parser $parser) |
|
| 45 | |||
| 46 | /** |
||
| 47 | * @param BufferInterface|string $string |
||
| 48 | * @return PrivateKey |
||
| 49 | */ |
||
| 50 | 80 | public function parse($string) |
|
| 54 | } |
||
| 55 |