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:----AkBYa/BHecIB3kzCd7RfJAm7F3jL+vF+wkh5rLgh5pUfXNxF6fnfGlwqts67AcxJzz21AE5UCTomzYjddjCit2aB6LRyKiyZX42aqodEX98gLGA8ysUyg15kT18ylZik5U8RkZoH79sViOsRRtJWsYIXjc7hHVPqGeBc6dsayYJF77jxWOF64XoxZwEl0vhSKyORzahE8ascrxhrtGjVzcztLO9YycYe5GoNd36bLvERQW4VB9nsImIB59yCiyU0ZiDmHY4fnRK/YMjK0kP0VWpCuGLC+VU3RCY0vprFnop6+QtDSzm9IxlGg5Lchr6OI9OQVjRGuMt+/kLk/VFy9S8HmK1vByVxElRlX6l/qa5IgrXk3xOgDQs6qPtoKrsPxY8wsI1CeHPaMnZE6VcAPb/S/E0wQw4lkbiU+DtO8y6gPFbfbK0lv/Ll4tmUJVY54GtlpuWnVtt+kqiSxPcZjjZ3FZblxGzrHvxzJUkOMX13U1zTqVomS+rSJDonwkkZVlPcmj+K4G5NSEsIqJrNmMwPym36NI1Fox+7p9BGUNDSj4ZGqQA6YlxjK38dGyh0EBATw8eaOgxbCfvxQSK3tw2GZraFhBSiXQujU787r3rr38NRQuE2AZRtRnGbsZlV6ZguVLLrb94gGpbM8LSBIINtv6fVcQt2LlPZFlcYq3c=----ATTACHMENT:----Nzk0NTk2NDg0MTI5NzkzOCA3Mzk2MzY1NzY3MDEzMjY4IDkyNzcwMjAwODIwMzg5MDE=