1 | <?php |
||
22 | class NSEC3PARAM implements RdataInterface |
||
23 | { |
||
24 | use RdataTrait; |
||
25 | |||
26 | const TYPE = 'NSEC3PARAM'; |
||
27 | const TYPE_CODE = 51; |
||
28 | |||
29 | /** |
||
30 | * @var int |
||
31 | */ |
||
32 | private $hashAlgorithm; |
||
33 | |||
34 | /** |
||
35 | * @var int |
||
36 | */ |
||
37 | private $flags = 0; |
||
38 | |||
39 | /** |
||
40 | * @var int |
||
41 | */ |
||
42 | private $iterations; |
||
43 | |||
44 | /** |
||
45 | * @var string Binary encoded string |
||
46 | */ |
||
47 | private $salt; |
||
48 | |||
49 | /** |
||
50 | * @return int |
||
51 | */ |
||
52 | 1 | public function getHashAlgorithm(): int |
|
56 | |||
57 | /** |
||
58 | * @param int $hashAlgorithm |
||
59 | * |
||
60 | * @throws \InvalidArgumentException |
||
61 | */ |
||
62 | 5 | public function setHashAlgorithm(int $hashAlgorithm): void |
|
69 | |||
70 | /** |
||
71 | * @return int |
||
72 | */ |
||
73 | 1 | public function getFlags(): int |
|
77 | |||
78 | /** |
||
79 | * @param int $flags |
||
80 | * |
||
81 | * @throws \InvalidArgumentException |
||
82 | */ |
||
83 | 5 | public function setFlags(int $flags): void |
|
90 | |||
91 | /** |
||
92 | * @return int |
||
93 | */ |
||
94 | 1 | public function getIterations(): int |
|
98 | |||
99 | /** |
||
100 | * @param int $iterations |
||
101 | */ |
||
102 | 5 | public function setIterations(int $iterations): void |
|
109 | |||
110 | /** |
||
111 | * @return string Base16 string |
||
112 | */ |
||
113 | 1 | public function getSalt(): string |
|
117 | |||
118 | /** |
||
119 | * @param string $salt Hexadecimal string |
||
120 | */ |
||
121 | 5 | public function setSalt(string $salt): void |
|
128 | |||
129 | /** |
||
130 | * {@inheritdoc} |
||
131 | */ |
||
132 | 1 | public function toText(): string |
|
136 | |||
137 | /** |
||
138 | * {@inheritdoc} |
||
139 | */ |
||
140 | 1 | public function toWire(): string |
|
144 | |||
145 | /** |
||
146 | * {@inheritdoc} |
||
147 | * |
||
148 | * @return NSEC3PARAM |
||
149 | */ |
||
150 | 1 | public static function fromText(string $text): RdataInterface |
|
161 | |||
162 | /** |
||
163 | * {@inheritdoc} |
||
164 | * |
||
165 | * @return NSEC3PARAM |
||
166 | */ |
||
167 | 1 | public static function fromWire(string $rdata): RdataInterface |
|
180 | } |
||
181 |