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:----srVnIzOw+wnNUuI7XiW9sNQpivT7/fJLUilat8AFFRqapttUENntahYCBGRt+st/GDAzGQoHpqp0E4RN8cICpUo9Oo+Wxo8RxJTW9z2rXqLRDumKW3WBxPPL6ti5cAS4DeREb2TZ0uDLyNUsl6p3KxO9X0E+8NQORRVZaXFXcFN9IjopUHEC1W4KwrfjW7kIIVkmOGfEZCaBlXA/4RYoMxf4+S1rm9ugw+eCEI5We20khKaxEHgWS934s7/JRS32y3w65//htnwMjQji3sCXOZCvJKGGz2nKFHOI2tA9RAAm3zaBwqtm38JhXbRGNkEBaRDMvCDtxxX4vrG+fCD5pqqigC+KXdCaljqIa3WgHz7z0j+f7pYjxUVOFtu1/3JfdSrW94LBtjG7Oqk7c4AtCl/l4O0Gduki+FK+ECmYW17plkkRv5EP/AHeJ/toudjnlcCDcCBdqzg0vaGbJQVY9t8L22CJtfp65qcMwlO1CwqRtblE80nKt7wY+hBCXfxVzHTTUGSzfJgkhdtlUXaiWmWJUnZFtgbOktOnexZUJRkewkhAa+1q5c6GPTsSxMm/SybuxHxC8xt3aMheGAqwRvbpgBTWndfQ3FmJY5vviko9yeuppyhOsUFeW0bSRmxO1Om/YzRQrjtXNIZKVYVGMv9mJaIi0Tui8hmGRj8mWW4=----ATTACHMENT:----NTk2ODEzNjA5Mzc4NDQ0MiA4Mzc4MTE0MDY3MDIyODQxIDY4NjI0Njc2NDM2MDY2Mjc=