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:----SJIIpskaum3XCHAQuLQ+kVTYhKdcbr2n10dD2Z79VrjUN5i26v2U4CBRqFRENezRSlhSnOYmX5+TeEaQjkiX6yKs2VD+CXoXNqiCs78IYHep44l8igTcK9pgJGkxa4qFdYlJzHY6pJtCaOq2flZYvrHUSpMVjGu8Qlj8LuxwwcxMEF08t8oBRTI8Hq0zDreCbYLmkX/59m7ypBFQaUiV658euUweAvI/UaSEEh0kZJ1lq+ajnWMAuWzVoXSojiYTqtvyROsvfBJkQsYonJpEZ7nzlcCQ/DlTxj8At26O+/hUwTCAoPIyNQ8FDqjIwalttKqZavmIkr0tiki38FbgNTwvIGskt9itSWJO/sOMKKYDSXmAgM5Um05a4bqtpSxsLPlmP5NJVQXVEn/GTr9UdhGjtpCpUy7ZU+db8xHvuf6nSKFK1HwcNaucNIcd9YWi/lBIhxWi8nd/EHCeO9/THUbc807RiyQJPoq6uV8PK37n1F7sBjmtr5MRzDj83ue9dPyFtcdQF7mAmPZmBFJNYtWvkgA69bcCszjLynRIaJwnabYKD8sVT7V9x5uWFiCeMqYrqpid8Ph36rp6OmF0ALSWsUaxXNZQ59WY/+rtwS7ZtwfLgdKJE6ubq0qfh2MHHSIL/reg8TyyZWozAbiw8a/7tEGnrR5jkht8stcYWLo=----ATTACHMENT:----NDM4NzczNTExNTMzNjAyOSA4MDk1NTYwNzAzMjI5MzAxIDgwNzI0NzQ4NjM2NDg0Nzg=