1 | <?php |
||
23 | class HIP implements RdataInterface |
||
24 | { |
||
25 | use RdataTrait; |
||
26 | |||
27 | const TYPE = 'HIP'; |
||
28 | const TYPE_CODE = 55; |
||
29 | |||
30 | /** |
||
31 | * @var int |
||
32 | */ |
||
33 | private $publicKeyAlgorithm; |
||
34 | |||
35 | /** |
||
36 | * @var string |
||
37 | */ |
||
38 | private $hostIdentityTag; |
||
39 | |||
40 | /** |
||
41 | * @var string |
||
42 | */ |
||
43 | private $publicKey; |
||
44 | |||
45 | /** |
||
46 | * @var string[] |
||
47 | */ |
||
48 | private $rendezvousServers = []; |
||
49 | |||
50 | /** |
||
51 | * @return int |
||
52 | */ |
||
53 | 1 | public function getPublicKeyAlgorithm(): int |
|
57 | |||
58 | /** |
||
59 | * @param int $publicKeyAlgorithm |
||
60 | */ |
||
61 | 4 | public function setPublicKeyAlgorithm(int $publicKeyAlgorithm): void |
|
65 | |||
66 | /** |
||
67 | * @return string |
||
68 | */ |
||
69 | 1 | public function getHostIdentityTag(): string |
|
73 | |||
74 | /** |
||
75 | * @param string $hostIdentityTag |
||
76 | */ |
||
77 | 4 | public function setHostIdentityTag(string $hostIdentityTag): void |
|
81 | |||
82 | /** |
||
83 | * @return string |
||
84 | */ |
||
85 | 1 | public function getPublicKey(): string |
|
89 | |||
90 | /** |
||
91 | * @param string $publicKey |
||
92 | */ |
||
93 | 4 | public function setPublicKey(string $publicKey): void |
|
97 | |||
98 | /** |
||
99 | * @param string $server |
||
100 | */ |
||
101 | 4 | public function addRendezvousServer(string $server): void |
|
109 | |||
110 | /** |
||
111 | * @return string[] |
||
112 | */ |
||
113 | 1 | public function getRendezvousServers(): array |
|
117 | |||
118 | /** |
||
119 | * Clear all rendezvous servers from the record. |
||
120 | */ |
||
121 | public function clearRendezvousServer(): void |
||
125 | |||
126 | /** |
||
127 | * {@inheritdoc} |
||
128 | */ |
||
129 | 1 | public function toText(): string |
|
138 | |||
139 | /** |
||
140 | * {@inheritdoc} |
||
141 | */ |
||
142 | 1 | public function toWire(): string |
|
158 | |||
159 | /** |
||
160 | * {@inheritdoc} |
||
161 | * |
||
162 | * @return HIP |
||
163 | * |
||
164 | * @throws ParseException |
||
165 | */ |
||
166 | 1 | public static function fromText(string $text): RdataInterface |
|
185 | |||
186 | /** |
||
187 | * {@inheritdoc} |
||
188 | * |
||
189 | * @return HIP |
||
190 | */ |
||
191 | 1 | public static function fromWire(string $rdata): RdataInterface |
|
215 | } |
||
216 |