1 | <?php |
||
18 | class DS implements RdataInterface |
||
19 | { |
||
20 | use RdataTrait; |
||
21 | |||
22 | const TYPE = 'DS'; |
||
23 | const TYPE_CODE = 43; |
||
24 | const DIGEST_SHA1 = 1; |
||
25 | |||
26 | /** |
||
27 | * @var int |
||
28 | */ |
||
29 | private $keyTag; |
||
30 | |||
31 | /** |
||
32 | * The Algorithm field lists the algorithm number of the DNSKEY RR |
||
33 | * referred to by the DS record. |
||
34 | * {@link https://tools.ietf.org/html/rfc4034#section-5.1.2}. |
||
35 | * |
||
36 | * @var int |
||
37 | */ |
||
38 | private $algorithm; |
||
39 | |||
40 | /** |
||
41 | * @var int |
||
42 | */ |
||
43 | private $digestType = self::DIGEST_SHA1; |
||
44 | |||
45 | /** |
||
46 | * @var string |
||
47 | */ |
||
48 | private $digest; |
||
49 | |||
50 | /** |
||
51 | * @return int |
||
52 | */ |
||
53 | 1 | public function getKeyTag(): int |
|
57 | |||
58 | /** |
||
59 | * @param int $keyTag |
||
60 | */ |
||
61 | 4 | public function setKeyTag(int $keyTag): void |
|
65 | |||
66 | /** |
||
67 | * @return int |
||
68 | */ |
||
69 | 1 | public function getAlgorithm(): int |
|
73 | |||
74 | /** |
||
75 | * @param int $algorithm |
||
76 | */ |
||
77 | 4 | public function setAlgorithm(int $algorithm): void |
|
81 | |||
82 | /** |
||
83 | * @return int |
||
84 | */ |
||
85 | 1 | public function getDigestType(): int |
|
89 | |||
90 | /** |
||
91 | * @param int $digestType |
||
92 | */ |
||
93 | 4 | public function setDigestType(int $digestType): void |
|
97 | |||
98 | /** |
||
99 | * @return string |
||
100 | */ |
||
101 | 1 | public function getDigest(): string |
|
105 | |||
106 | /** |
||
107 | * @param string $digest |
||
108 | */ |
||
109 | 4 | public function setDigest(string $digest): void |
|
113 | |||
114 | /** |
||
115 | * {@inheritdoc} |
||
116 | */ |
||
117 | 1 | public function toText(): string |
|
127 | |||
128 | /** |
||
129 | * {@inheritdoc} |
||
130 | */ |
||
131 | 1 | public function toWire(): string |
|
135 | |||
136 | /** |
||
137 | * {@inheritdoc} |
||
138 | */ |
||
139 | 1 | public static function fromText(string $text): RdataInterface |
|
150 | |||
151 | /** |
||
152 | * {@inheritdoc} |
||
153 | */ |
||
154 | 1 | public static function fromWire(string $rdata): RdataInterface |
|
165 | } |
||
166 |