1 | <?php |
||
16 | class PrivateKeySerializer implements PrivateKeySerializerInterface |
||
17 | { |
||
18 | /** |
||
19 | * @var EcAdapter |
||
20 | */ |
||
21 | private $ecAdapter; |
||
22 | |||
23 | /** |
||
24 | * @param EcAdapter $ecAdapter |
||
25 | */ |
||
26 | public function __construct(EcAdapter $ecAdapter) |
||
30 | |||
31 | 300 | /** |
|
32 | * @param PrivateKey $privateKey |
||
33 | 300 | * @return BufferInterface |
|
34 | 300 | */ |
|
35 | private function doSerialize(PrivateKey $privateKey) |
||
39 | |||
40 | 276 | /** |
|
41 | * @param PrivateKeyInterface $privateKey |
||
42 | 276 | * @return BufferInterface |
|
43 | */ |
||
44 | public function serialize(PrivateKeyInterface $privateKey) |
||
49 | 276 | ||
50 | /** |
||
51 | * @param Parser $parser |
||
52 | 276 | * @return PrivateKey |
|
53 | * @throws \BitWasp\Buffertools\Exceptions\ParserOutOfRange |
||
54 | */ |
||
55 | public function fromParser(Parser $parser) |
||
59 | |||
60 | /** |
||
61 | * @param \BitWasp\Buffertools\BufferInterface|string $data |
||
62 | * @return PrivateKey |
||
63 | */ |
||
64 | public function parse($data) |
||
68 | } |
||
69 |