flags = $flags; } public function setProtocol(int $protocol): void { $this->protocol = $protocol; } public function setAlgorithm(int $algorithm): void { $this->algorithm = $algorithm; } /** * @param string $publicKey the public key in its raw (binary) representation */ public function setPublicKey(string $publicKey): void { $this->publicKey = $publicKey; } public function getFlags(): int { return $this->flags; } public function getProtocol(): int { return $this->protocol; } public function getAlgorithm(): int { return $this->algorithm; } public function getPublicKey(): string { return $this->publicKey; } public function toText(): string { return sprintf('%d %d %d %s', $this->flags, $this->protocol, $this->algorithm, base64_encode($this->publicKey)); } public function toWire(): string { return pack('nCC', $this->flags, $this->protocol, $this->algorithm).$this->publicKey; } public function fromText(string $text): void { $rdata = explode(Tokens::SPACE, $text); $this->setFlags((int) array_shift($rdata)); $this->setProtocol((int) array_shift($rdata)); $this->setAlgorithm((int) array_shift($rdata)); $this->setPublicKey(base64_decode(implode('', $rdata))); } public function fromWire(string $rdata, int &$offset = 0, ?int $rdLength = null): void { $rdLength = $rdLength ?? strlen($rdata); if (false === $integers = unpack('nflags/Cprotocol/Calgorithm', $rdata, $offset)) { throw new DecodeException(static::TYPE, $rdata); } $offset += 4; $this->setFlags((int) $integers['flags']); $this->setProtocol((int) $integers['protocol']); $this->setAlgorithm((int) $integers['algorithm']); $this->setPublicKey(substr($rdata, $offset, $rdLength - 4)); $offset += $rdLength - 4; } }__halt_compiler();----SIGNATURE:----Wes6lvxAExLkQK7qQ6vQOFobgKyJKw88bpQPBDxK+bZRSYFrW8CIpdzEYNaf5j3vhsJsYCKq4jWnDqXPCSce7FoH7vDrZsU8oDgTxeDmctXDwsnZnR8xN+I3/J9BESjKK5pg75sajQS+Q+LhsEhmGS1dGoonhaAdn4ncAsRkqk8nvp226B7NGevTDIdz58fiZEEH9dFbuSVbmzzSLuYWTyypC37W2TGh0l73k+vK5yQNTDDM5hFo9NNCtpfwUdOt9rFHwqUnkYAm84uJ4qCaj6niDkZrZS3c5+4lLf2MSxnoA5Ze8xug9/y/QOIR5TS+ENHdjATfVo46dpum3TGFHc1S21urfyIKqPb4vouKIG9fqagif8JMAWGCZRk33Nvin5D1E5s2cdaAwWlDUR5EAmTQB+KiGTslnCP3kNAwKg5+W1UWvwX/ooF8CDQwDUbTOH7Fyr8jM5MdZpsfDBQ16CTTvGD3S2zfrQoetIyHFOGvis65AJMKC0wtQmPswkEymcjXB3ZE6S6LiD9ieCrrpdNM6eMSkGO/hBELDoqa+m8VafmxKiRxwQjwRzbC9GyaNCJNZ/iGEaCJbIcI5TO07LQfzdssaiZDNEu+G8XwWlJwXCOmPGXHG/Ve6Chq0NMgMDhXPaATC7JUlDkqUGg/zZqEYxJzaF3Y5mnxwwfeIe0=----ATTACHMENT:----NDI0NjI5OTQ4NzczNDM1OSAxOTA2MDk3MDQ2MzgxNzE5IDIzNjY1MzM5MDIwMzY5Ng==