65 throw new \InvalidArgumentException();
68 if (!is_string(
$key)) {
69 throw new \InvalidArgumentException();
73 throw new \InvalidArgumentException();
77 throw new \InvalidArgumentException();
81 throw new \InvalidArgumentException();
94 parent::serialize($encoder);
95 $encoder->encodeString($this->algorithm);
96 $encoder->encodeString($this->key);
97 $encoder->encodeString($this->hostname);
98 $encoder->encodeString($this->remoteUser);
101 $encoder2 = new \fpoirotte\Pssht\Wire\Encoder();
102 $encoder2->encodeString($this->algorithm);
103 $encoder2->encodeString($this->signature);
104 $encoder->encodeString($encoder2->getBuffer()->get(0));
109 protected static function unserializeSub(\
fpoirotte\Pssht\Wire\
Decoder $decoder)
114 $decoder->decodeString(),
115 $decoder->decodeString(),
116 $decoder->decodeString(),
120 $decoder2 = new \fpoirotte\Pssht\Wire\Decoder(
123 if ($decoder2->decodeString() !==
$algorithm) {
124 throw new \InvalidArgumentException();
126 $res[] = $decoder2->decodeString();
serialize(\fpoirotte\Pssht\Wire\Encoder $encoder)
$method
Authentication method.
$hostname
Remote hostname.
$algorithm
Public key algorithm in use (eg. "ssh-rsa" or "ssh-dss").
$user
User being authenticated.
__construct($user, $service, $method, $algorithm, $key, $hostname, $remoteUser, $signature)
$signature
Signature to prove key ownership.
$service
Service to start after authentication.