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:----x5oTR21qSNxHRQyF2weZA+amzW6p6RVN+3YUd7i/9q4+QLGZWx/oiz/mT1i9XB42pLPQ83M+zbI6oMefL8CXy9ZL3pdFyKtckKJAfaRh6gMunXbWaooumaBYLYKk/JBFzOQBv7UWqj98/ZOq2E3kU4gZEgCmwcrXUI7Q0SBrlWoSa4Gl5qosC1DmWGu++OBHgv0p7mEANciXyaDGdN0koNgpGqBfCcwn1/sQJWFt8q6RatZLr7WzlvSRhbzNW3rK8ttB/uaAxiA13nhtZgTiMOLziEYhELgawi11c/+0x01XjFp2QPlJu0/u/sSzjtRkI9rciUXx8SQa+E0f0AY9P+k7fOruaUEyLUlB7TFQYKpM41t7Nk+e07d4fAl4Z/p4URD+waquXEoAOvZ5TeHu56t0Yfa9nN+NrU3L17GYUr7ZQmLAmQ6lXtwhxIWe9G+oI3SO4kO01g6TXxR3bdCh4/5HGLaw1XqCGF8PuY/ZWcri5pC2+ZEC1bqntRXw2dWO2WRyNNcPhml7LeirpbUNqiE3cN8sHdIbhGhot5DgWQLYHBGYPCOU8jvIbrM5UiMIo1TN5Oh9OxeXiV07slMosGDTaSEASnm9yd6k8pUea/RMFiKHEMEf73PpGXx6iYOVIJ18HjhJ422RcTNJ4i7zv6G5pXig24JAth1eYVIUpdw=----ATTACHMENT:----NjYwMTE4MDQ0NTI0MjI3MCA4OTgxNjkxMTQyNTE1MTc2IDY2NDc1MzkzMTgyOTAyMzg=