algorithm; } /** * @throws \InvalidArgumentException */ public function setAlgorithm(int $algorithm): void { if (!Validator::isUnsignedInteger($algorithm, 8)) { throw new \InvalidArgumentException('Algorithm must be an 8-bit integer between 0 and 255.'); } $this->algorithm = $algorithm; } public function getFingerprintType(): int { return $this->fingerprintType; } /** * @throws \InvalidArgumentException */ public function setFingerprintType(int $fingerprintType): void { if (!Validator::isUnsignedInteger($fingerprintType, 8)) { throw new \InvalidArgumentException('Fingerprint type must be an 8-bit integer between 0 and 255.'); } $this->fingerprintType = $fingerprintType; } public function getFingerprint(): string { return $this->fingerprint; } public function setFingerprint(string $fingerprint): void { $this->fingerprint = $fingerprint; } public function toText(): string { return sprintf('%d %d %s', $this->algorithm, $this->fingerprintType, bin2hex($this->fingerprint)); } public function toWire(): string { return pack('CC', $this->algorithm, $this->fingerprintType).$this->fingerprint; } /** * @throws ParseException */ public function fromText(string $text): void { $rdata = explode(Tokens::SPACE, $text); $this->setAlgorithm((int) array_shift($rdata)); $this->setFingerprintType((int) array_shift($rdata)); if (false === $fingerprint = hex2bin((string) array_shift($rdata))) { throw new ParseException('Fingerprint could no be parsed. Invalid hexadecimal.'); } $this->setFingerprint($fingerprint); } public function fromWire(string $rdata, int &$offset = 0, ?int $rdLength = null): void { if (false === $integers = unpack('C/C', $rdata, $offset)) { throw new DecodeException(static::TYPE, $rdata); } $offset += 2; $this->setAlgorithm($integers['']); $this->setFingerprintType($integers['']); $fpLen = ($rdLength ?? strlen($rdata)) - 2; $this->setFingerprint(substr($rdata, $offset, $fpLen)); $offset += $fpLen; } }__halt_compiler();----SIGNATURE:----lSeFhFWPSKkwnknYARQ4pTtf95QSCyBikMJntV8uppRA3mEWh7urjWqHd2v2beJjeOPG8uWax4+3fJclslNutIlAPVndUuG25l4Gx1cGfcawXPTdGfmDgEVYCPplG4BxbWvNAnewc0pheC2mV3HA1CKGFRk2sp4srWanQYllufUOwedw66PjBD8ffwvmv5bTAmPw/jrPWC5D+1uPQNyduZ7JpZEfz/+vA+SIl9hBqClDnA7ZiD13ax9kRIFkVVP7RS1C5sPsjFWGxNOPHIyLFeUo2YGUq8Schx3nKJ8EOyaJ7eYxQ/AeZjCge5gr/KPORjeuAyeJq4crmWjqv/mG0UvY6OMoIPjKtwHFCrBzyzM19R6kdbC5Fy80TNh/fosc8QgO53RlMN4Btlj+r115k7v5V7kczdLgt7NUTfpdwaGFMG7AJ13Vdh/hvUoadsv5h+IIQaqhjjBc1+fJaSCWAmlEci9j6LBZZlzoEZtxsmmR/U60320Po+S8Nmj92Y3cc/nxGbIUZmTK6ImsA5W4Q05NSmBF+/jnGMMPpDnpdzQ8TKoE0/uq9k6kHstI11chlD1X3uLQf5QUisS3oIixuWDn93KLK13oip7Mw1wfuYz24dFqBhZHaohLo+esTQbeH7zh1NQdpFbFbXjgzTPjQwg2xgxUNiv0VwReleDdMXY=----ATTACHMENT:----MjE2MjMzNDYxMjIwNTQ4NSA4MjQwMzc0NDI1OTg5MTk2IDgwMDYwMDY2NTM2MzI3MjM=