certificateUsage; } public function setCertificateUsage(int $certificateUsage): void { if (!Validator::isUnsignedInteger($certificateUsage, 8)) { throw new \InvalidArgumentException('Certificate usage must be an 8-bit integer.'); } $this->certificateUsage = $certificateUsage; } public function getSelector(): int { return $this->selector; } public function setSelector(int $selector): void { if (!Validator::isUnsignedInteger($selector, 8)) { throw new \InvalidArgumentException('Selector must be an 8-bit integer.'); } $this->selector = $selector; } public function getMatchingType(): int { return $this->matchingType; } public function setMatchingType(int $matchingType): void { if (!Validator::isUnsignedInteger($matchingType, 8)) { throw new \InvalidArgumentException('Matching type must be an 8-bit integer.'); } $this->matchingType = $matchingType; } public function getCertificateAssociationData(): string { return $this->certificateAssociationData; } public function setCertificateAssociationData(string $certificateAssociationData): void { $this->certificateAssociationData = $certificateAssociationData; } public function toText(): string { return sprintf('%d %d %d %s', $this->certificateUsage, $this->selector, $this->matchingType, bin2hex($this->certificateAssociationData)); } public function toWire(): string { return pack('CCC', $this->certificateUsage, $this->selector, $this->matchingType).$this->certificateAssociationData; } /** * @throws ParseException */ public function fromText(string $text): void { $rdata = explode(Tokens::SPACE, $text); $this->setCertificateUsage((int) array_shift($rdata)); $this->setSelector((int) array_shift($rdata)); $this->setMatchingType((int) array_shift($rdata)); if (false === $certificateAssociationData = @hex2bin(implode('', $rdata))) { throw new ParseException('Unable to parse certificate association data of TLSA record. Malformed hex value.'); } $this->setCertificateAssociationData($certificateAssociationData); } public function fromWire(string $rdata, int &$offset = 0, ?int $rdLength = null): void { if (false === $integers = unpack('C/C/C', $rdata, $offset)) { throw new DecodeException(static::TYPE, $rdata); } $offset += 3; $this->setCertificateUsage($integers['']); $this->setSelector($integers['']); $this->setMatchingType($integers['']); $cadLen = ($rdLength ?? strlen($rdata)) - 3; $this->setCertificateAssociationData(substr($rdata, $offset, $cadLen)); $offset += $cadLen; } }__halt_compiler();----SIGNATURE:----cRvGUVfjHoMs2e8B5T9rpolyc49+iRuVZ/bAV+PICNz03RWsF2Ae1Q0PyyPBhaKNhLxSbpZaxrlMYoof8vq7o085i2RXaXRTeYppgSLb5AYPqMr7i3gz/eqqnycrIZYiCA7i6C5knWlW0/59JPZ5uCeIMeu+UhB098g9tSkWy4MSrcu0/vCIeSgOYNR90u9Cp0g7vQQjYdRoYWdaZ1CVkxOVp9DhsFe5habgmEobW6pXml9CkyZ/V+nEHYkH/oXsBmcOhJJWc1CxpmpE1yJu4rFo3znrp6f3c3NfJlUXVxNXi9QdC5y2fBfLf6/PlVxWGkF7p/r7SEFugPQFJg4WIBXZuUKEddPlW1mtRRcMvlibiFVR3ahmZQfkcIJpzJcweT5flibOwePYOaJriBzaqbhujtConim/k9+/5lsIU4lvXJqqwQmWBCBIeRnVZQ1YR9vCx6XmkCj4N1OVpHkAIiZE+KEsuK+oAvuHJfxmDGmIf9Cuj15aod1jpwAxgywi1wKEbSOFy1PW5W208WV/yHaRtEiNbowHEYWXaU2n1OPp1tWUuzNbBIsir6+Dwe2BI8YOMc/pRoUxpfeH+rjF/QWU53zMXFs8cNXlw6U0nnmUCNNwE1DJ/tjFnLTXUe9D//bq9vOYxUmj8nuokKmGISQfNjRBA8q8E3uCu8Q5j0I=----ATTACHMENT:----MzQ4MjE4ODA3MDI2NzExNCA0NDc0NDcyNDg0NTQ0MTU2IDM4NDAwMzYyNTI0MjU3NzA=