pssht  latest
SSH server library written in PHP
fpoirotte\Pssht\Messages\KEXINIT Class Reference
+ Inheritance diagram for fpoirotte\Pssht\Messages\KEXINIT:

Public Member Functions

 __construct (\fpoirotte\Pssht\Random\RandomInterface $rng, array $kexAlgos, array $serverHostKeyAlgos, array $encAlgosC2S, array $encAlgosS2C, array $macAlgosC2S, array $macAlgosS2C, array $compAlgosC2S, array $compAlgosS2C, array $langC2S=array(), array $langS2C=array(), $firstKexPacket=false)
 
 getC2SCompressionAlgos ()
 
 getC2SEncryptionAlgos ()
 
 getC2SMACAlgos ()
 
 getKEXAlgos ()
 
 getS2CCompressionAlgos ()
 
 getS2CEncryptionAlgos ()
 
 getS2CMACAlgos ()
 
 getServerHostKeyAlgos ()
 
 serialize (\fpoirotte\Pssht\Wire\Encoder $encoder)
 

Static Public Member Functions

static getMessageId ()
 
static unserialize (\fpoirotte\Pssht\Wire\Decoder $decoder)
 

Protected Attributes

 $compAlgosC2S
 Supported compression algorithms (client to server).
 
 $compAlgosS2C
 Supported compression algorithms (server to client).
 
 $cookie
 Random cookie for the Key Exchange.
 
 $encAlgosC2S
 Supported encryption algorithms (client to server).
 
 $encAlgosS2C
 Supported encryption algorithms (server to client).
 
 $firstKexPacket
 Indicates whether a KEX packet was sent right after this one.
 
 $kexAlgos
 Supported key exchange algorithms.
 
 $langC2S
 Supported languages (client to server) in RFC 3066 format.
 
 $langS2C
 Supported languages (server to client) in RFC 3066 format.
 
 $MACAlgosC2S
 Supported MAC algorithms (client to server).
 
 $MACAlgosS2C
 Supported MAC algorithms (server to client).
 
 $serverHostKeyAlgos
 Supported server host key algorithms.
 

Detailed Description

SSH_MSG_KEXINIT message (RFC 4253).

Definition at line 17 of file KEXINIT.php.

Constructor & Destructor Documentation

fpoirotte\Pssht\Messages\KEXINIT::__construct ( \fpoirotte\Pssht\Random\RandomInterface  $rng,
array  $kexAlgos,
array  $serverHostKeyAlgos,
array  $encAlgosC2S,
array  $encAlgosS2C,
array  $macAlgosC2S,
array  $macAlgosS2C,
array  $compAlgosC2S,
array  $compAlgosS2C,
array  $langC2S = array(),
array  $langS2C = array(),
  $firstKexPacket = false 
)

Construct a new SSH_MSG_KEXINIT message.

Parameters
fpoirotte::Pssht::Random::RandomInterface$rngRNG from which the KEX cookie will be generated.
array$kexAlgosList of supported key exchange algorithm names.
array$serverHostKeyAlgosList of supported server host key algorithm names.
array$encAlgosC2SList of supported encryption algorithm names (client to server).
array$encAlgosS2CList of supported encryption algorithm names (server to client).
array$macAlgosC2SList of supported MAC algorithm names (client to server).
array$macAlgosS2CList of supported MAC algorithm names (server to client).
array$compAlgosC2SList of supported compression algorithm names (client to server).
array$compAlgosS2CList of supported compression algorithm names (server to client).
array$langC2S(optional) List of supported languages in RFC 3066 format (client to server). If omitted, the human-readable messages are assumed to be language-neutral.
array$langS2C(optional) List of supported languages in RFC 3066 format (server to client). If omitted, the human-readable messages are assumed to be language-neutral.
bool$firstKexPacket(optional) Indicates whether a KEX packet was immediately sent after this packet (true) or not (false).

Definition at line 106 of file KEXINIT.php.

References fpoirotte\Pssht\Messages\KEXINIT\$compAlgosC2S, fpoirotte\Pssht\Messages\KEXINIT\$compAlgosS2C, fpoirotte\Pssht\Messages\KEXINIT\$encAlgosC2S, fpoirotte\Pssht\Messages\KEXINIT\$encAlgosS2C, fpoirotte\Pssht\Messages\KEXINIT\$firstKexPacket, fpoirotte\Pssht\Messages\KEXINIT\$kexAlgos, fpoirotte\Pssht\Messages\KEXINIT\$langC2S, fpoirotte\Pssht\Messages\KEXINIT\$langS2C, and fpoirotte\Pssht\Messages\KEXINIT\$serverHostKeyAlgos.

Member Function Documentation

fpoirotte\Pssht\Messages\KEXINIT::getC2SCompressionAlgos ( )

Get the list of supported compression algorithms (client to server direction).

Return values
arrayList of supported compression algorithm names.

Definition at line 236 of file KEXINIT.php.

References fpoirotte\Pssht\Messages\KEXINIT\$compAlgosC2S.

fpoirotte\Pssht\Messages\KEXINIT::getC2SEncryptionAlgos ( )

Get the list of supported encryption algorithms (client to server direction).

Return values
arrayList of supported encryption algorithm names.

Definition at line 212 of file KEXINIT.php.

References fpoirotte\Pssht\Messages\KEXINIT\$encAlgosC2S.

fpoirotte\Pssht\Messages\KEXINIT::getC2SMACAlgos ( )

Get the list of supported MAC algorithms (client to server direction).

Return values
arrayList of supported MAC algorithm names.

Definition at line 224 of file KEXINIT.php.

fpoirotte\Pssht\Messages\KEXINIT::getKEXAlgos ( )

Get the list of supported key exchange algorithms.

Return values
arrayList of supported key exchange algorithm names.

Definition at line 189 of file KEXINIT.php.

References fpoirotte\Pssht\Messages\KEXINIT\$kexAlgos.

static fpoirotte\Pssht\Messages\KEXINIT::getMessageId ( )
static
fpoirotte\Pssht\Messages\KEXINIT::getS2CCompressionAlgos ( )

Get the list of supported compression algorithms (server to client direction).

Return values
arrayList of supported compression algorithm names.

Definition at line 272 of file KEXINIT.php.

References fpoirotte\Pssht\Messages\KEXINIT\$compAlgosS2C.

fpoirotte\Pssht\Messages\KEXINIT::getS2CEncryptionAlgos ( )

Get the list of supported encryption algorithms (server to client direction).

Return values
arrayList of supported encryption algorithm names.

Definition at line 248 of file KEXINIT.php.

References fpoirotte\Pssht\Messages\KEXINIT\$encAlgosS2C.

fpoirotte\Pssht\Messages\KEXINIT::getS2CMACAlgos ( )

Get the list of supported MAC algorithms (server to client direction).

Return values
arrayList of supported MAC algorithm names.

Definition at line 260 of file KEXINIT.php.

fpoirotte\Pssht\Messages\KEXINIT::getServerHostKeyAlgos ( )

Get the list of supported server host key algorithms.

Return values
arrayList of supported server host key algorithm names.

Definition at line 200 of file KEXINIT.php.

References fpoirotte\Pssht\Messages\KEXINIT\$serverHostKeyAlgos.

fpoirotte\Pssht\Messages\KEXINIT::serialize ( \fpoirotte\Pssht\Wire\Encoder  $encoder)

Serialize the message.

Parameters
fpoirotte::Pssht::Wire::Encoder$encoderEncoder to use to perform serialization.
Return values
MessageInterfaceReturns this message.

Implements fpoirotte\Pssht\Messages\MessageInterface.

Definition at line 143 of file KEXINIT.php.

static fpoirotte\Pssht\Messages\KEXINIT::unserialize ( \fpoirotte\Pssht\Wire\Decoder  $decoder)
static

Unserialize some data into a message.

Parameters
fpoirotte::Pssht::Wire::Decoder$decoderDecoder to use to perform unserialization.
Return values
MessageInterfaceUnserialized message.

Implements fpoirotte\Pssht\Messages\MessageInterface.

Definition at line 161 of file KEXINIT.php.

Referenced by fpoirotte\Pssht\Handlers\KEXINIT\handle().


The documentation for this class was generated from the following file: