1 | <?php |
||
13 | class PrivateKeySerializer implements PrivateKeySerializerInterface |
||
14 | { |
||
15 | /** |
||
16 | * @var EcAdapter |
||
17 | */ |
||
18 | private $ecAdapter; |
||
19 | |||
20 | /** |
||
21 | * @var bool |
||
22 | */ |
||
23 | private $haveNextCompressed = false; |
||
24 | |||
25 | /** |
||
26 | * @param EcAdapter $ecAdapter |
||
27 | */ |
||
28 | 110 | public function __construct(EcAdapter $ecAdapter) |
|
32 | |||
33 | /** |
||
34 | * @param PrivateKeyInterface $privateKey |
||
35 | * @return BufferInterface |
||
36 | */ |
||
37 | 70 | public function serialize(PrivateKeyInterface $privateKey) |
|
45 | |||
46 | /** |
||
47 | * @return $this |
||
48 | */ |
||
49 | public function setNextCompressed() |
||
54 | |||
55 | /** |
||
56 | * @param Parser $parser |
||
57 | * @return PrivateKey |
||
58 | */ |
||
59 | 56 | public function fromParser(Parser $parser) |
|
65 | |||
66 | /** |
||
67 | * @param BufferInterface|string $string |
||
68 | * @return PrivateKey |
||
69 | */ |
||
70 | 56 | public function parse($string) |
|
74 | } |
||
75 |