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:----PY8oQxsHN9zPL3bFtm2EVKjkq/0VgVzPtoLtRb0u33tWsAYClCcrBar3uFpXQPZtJKF7p3H8cWWo71wHqgv++bwgtXc6jUEw0eGen+aqopqBlPxclQY+JNURm90v8ILugioyBIuDwl9h4mC7ByqD2nFcdu6T9AcnZtP2I2qemz8EH6S9sd3UYUfP7WyhKdlm6PLvlclQJtqbYbirAn+ZTOKvb/NKW+ajp22vdSg7IBSUxg9qAhlJBubFVwEV6Nj+/4beWT80wMl5pWeXMQh2lQbSBuSEN044ghHIYgJK0VWPH5lrAMsaENTSy4KUxgZd6PClkO8TTjXxZ2tznKLmvPUVORrRmo3axqtYJmY9rQPtI/Q3za3WOpt6puZ7hGSlJO6DK85h4jvjDnA7SbdFxu3ZDufej6fYZpmt1qEX8W4N0Y5jxc2j3anKgLvTvRdxVPyZRuYRD6iX4Um2kHfppZDqUzidxjwnIcDm5tNFuAYh3qlvruGYq/MKNZHThU3eHIWMdd6uyVXBKXOZLO1e2dQxJ8KRrFM02JXKONfYyYIJvtii0dS39fhah8NV1vzuMsZxGN7l3+eTj1se8jRDgM92WFCLdALTRv/KOHNFzbutNDV41+oXMX0L1FYMLWYt5haO/WeZRGMzdLBS8UZskp54PRwZ6jOYbxYUvl6eqPY=----ATTACHMENT:----NjUwMjQzNzA5NTQwNTA1NCA1MjQzODU0MzA5MjAwNDIyIDkzOTQ1MTQ0OTIzNDUxODc=