1 | <?php |
||
12 | class CompactSignature extends Signature implements CompactSignatureInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var resource |
||
16 | */ |
||
17 | private $resource; |
||
18 | |||
19 | /** |
||
20 | * @var bool |
||
21 | */ |
||
22 | private $compressed; |
||
23 | |||
24 | /** |
||
25 | * @var int |
||
26 | */ |
||
27 | private $recid; |
||
28 | |||
29 | /** |
||
30 | * @var EcAdapter |
||
31 | */ |
||
32 | private $ecAdapter; |
||
|
|||
33 | |||
34 | /** |
||
35 | * @param EcAdapter $ecAdapter |
||
36 | * @param resource $secp256k1_ecdsa_signature_t |
||
37 | * @param int $recid |
||
38 | * @param bool $compressed |
||
39 | */ |
||
40 | 7 | public function __construct(EcAdapter $ecAdapter, $secp256k1_ecdsa_signature_t, int $recid, bool $compressed) |
|
64 | |||
65 | /** |
||
66 | * @return Signature |
||
67 | */ |
||
68 | public function convert(): Signature |
||
75 | |||
76 | /** |
||
77 | * @return resource |
||
78 | */ |
||
79 | 6 | public function getResource() |
|
83 | |||
84 | /** |
||
85 | * @return int |
||
86 | */ |
||
87 | 5 | public function getRecoveryId(): int |
|
91 | |||
92 | /** |
||
93 | * @return int |
||
94 | */ |
||
95 | 5 | public function getFlags(): int |
|
99 | |||
100 | /** |
||
101 | * @return bool |
||
102 | */ |
||
103 | 6 | public function isCompressed(): bool |
|
107 | |||
108 | /** |
||
109 | * @return BufferInterface |
||
110 | */ |
||
111 | 5 | public function getBuffer(): BufferInterface |
|
115 | } |
||
116 |