| 1 | <?php |
||
| 14 | class DS implements RdataInterface |
||
| 15 | { |
||
| 16 | use RdataTrait; |
||
| 17 | |||
| 18 | const TYPE = 'DS'; |
||
| 19 | |||
| 20 | const DIGEST_SHA1 = 1; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var int |
||
| 24 | */ |
||
| 25 | private $keyTag; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * The Algorithm field lists the algorithm number of the DNSKEY RR |
||
| 29 | * referred to by the DS record. |
||
| 30 | * {@link https://tools.ietf.org/html/rfc4034#section-5.1.2}. |
||
| 31 | * |
||
| 32 | * @var int |
||
| 33 | */ |
||
| 34 | private $algorithm; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @var int |
||
| 38 | */ |
||
| 39 | private $digestType = self::DIGEST_SHA1; |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @var string |
||
| 43 | */ |
||
| 44 | private $digest; |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @return int |
||
| 48 | */ |
||
| 49 | 2 | public function getKeyTag(): int |
|
| 53 | |||
| 54 | /** |
||
| 55 | * @param int $keyTag |
||
| 56 | */ |
||
| 57 | 4 | public function setKeyTag(int $keyTag): void |
|
| 61 | |||
| 62 | /** |
||
| 63 | * @return int |
||
| 64 | */ |
||
| 65 | 2 | public function getAlgorithm(): int |
|
| 69 | |||
| 70 | /** |
||
| 71 | * @param int $algorithm |
||
| 72 | */ |
||
| 73 | 4 | public function setAlgorithm(int $algorithm): void |
|
| 77 | |||
| 78 | /** |
||
| 79 | * @return int |
||
| 80 | */ |
||
| 81 | 2 | public function getDigestType(): int |
|
| 85 | |||
| 86 | /** |
||
| 87 | * @param int $digestType |
||
| 88 | */ |
||
| 89 | 4 | public function setDigestType(int $digestType): void |
|
| 93 | |||
| 94 | /** |
||
| 95 | * @return string |
||
| 96 | */ |
||
| 97 | 2 | public function getDigest(): string |
|
| 101 | |||
| 102 | /** |
||
| 103 | * @param string $digest |
||
| 104 | */ |
||
| 105 | 4 | public function setDigest(string $digest): void |
|
| 109 | |||
| 110 | /** |
||
| 111 | * {@inheritdoc} |
||
| 112 | */ |
||
| 113 | 2 | public function output(): string |
|
| 123 | } |
||
| 124 |