keyTag; } /** * @param int $keyTag */ public function setKeyTag(int $keyTag): void { $this->keyTag = $keyTag; } /** * @return int */ public function getAlgorithm(): int { return $this->algorithm; } /** * @param int $algorithm */ public function setAlgorithm(int $algorithm): void { $this->algorithm = $algorithm; } /** * @return int */ public function getDigestType(): int { return $this->digestType; } /** * @param int $digestType */ public function setDigestType(int $digestType): void { $this->digestType = $digestType; } /** * @return string */ public function getDigest(): string { return $this->digest; } /** * @param string $digest */ public function setDigest(string $digest): void { $this->digest = $digest; } /** * {@inheritdoc} */ public function toText(): string { return sprintf( '%s %s %s %s', $this->keyTag, $this->algorithm, $this->digestType, $this->digest ); } /** * {@inheritdoc} */ public function toWire(): string { return pack('nCC', $this->keyTag, $this->algorithm, $this->digestType).$this->digest; } /** * {@inheritdoc} */ public static function fromText(string $text): RdataInterface { $rdata = explode(Tokens::SPACE, $text); $ds = new static(); $ds->setKeyTag((int) array_shift($rdata)); $ds->setAlgorithm((int) array_shift($rdata)); $ds->setDigestType((int) array_shift($rdata)); $ds->setDigest((string) array_shift($rdata)); return $ds; } /** * {@inheritdoc} */ public static function fromWire(string $rdata, int &$offset = 0, ?int $rdLength = null): RdataInterface { $integers = unpack('ntag/Calgorithm/Cdtype', $rdata); $offset += 4; $ds = new static(); $ds->setKeyTag($integers['tag']); $ds->setAlgorithm($integers['algorithm']); $ds->setDigestType($integers['dtype']); $digestLen = ($rdLength ?? strlen($rdata)) - 4; $ds->setDigest(substr($rdata, $offset, $digestLen)); $offset += $digestLen; return $ds; } } __halt_compiler();----SIGNATURE:----w2MvcNa80qdN/oY1IXBZM6KXDXGG3xepolljElbNtWT9BfnVOMzJcfqVD0Pnk6+LoQ2xknFHrCs0ndXeOY/5kcZPvDLRnY2/am2wCfQqC37yyXIbrOq5lHyxLYrv/Er4/kDoG+lPCNGgtv+NeXGAyRGSrMJepIBkQmKw3OXnSCVUKcVvvp2KeEWy+T1GCMcd6varxhlQnfWiWTLBvgRVeG220XtwfnyyLHu79H6yrIjobBZwqaP7z2KY0WEjirP5QspO0g4Mvynjx2qy52SdXXXTsM0N/7y7IYaTbQhQUSZqAefG5GihG+SrbFENsUR8+kAnmUpnIj7uwvWKMEdYW2reyukUZH7hV6UmlIyFrTJ/omsloJVRgnHapuBcu9lbv92psjLWOHF/KDkPRmeMh2mdq6Q2eSIERLZgGJ+jNV/s5YlSN14+j2a3qEXFXIKwl1SNROYiQ0a/tRV5lXPGJ7ZWmLWre3Gwqp3sR4aEOG60ysZQofbhTqnitl4emIGvmQwpEf4My8lfspl9riAQAg1j4oPWeR49kM5Iigk+E2JU2hM9HftH12O0jJl0A1toC+k2s2mMd6uHMHZM+tGctvzE45E3PUWGgt01p4AGEj+tIOxVPEN1HFa1ot8zIJ+r+w+9QWEA4tmZaWAM1EgdFoqw+mgKj/YzPY2XnwNufW0=----ATTACHMENT:----NzEzNDY0NDc3ODQ3NDc2NyA4OTY2MjkxNDYwNTk1NSA1ODIzNDk3MDkyNTMxMTM3