pssht
latest
SSH server library written in PHP
Main Page
Classes
Files
File List
RFC5656.php
1
<?php
2
3
/*
4
* This file is part of pssht.
5
*
6
* (c) François Poirotte <clicky@erebot.net>
7
*
8
* For the full copyright and license information, please view the LICENSE
9
* file that was distributed with this source code.
10
*/
11
12
namespace
fpoirotte\Pssht\Messages\KEX\ECDH\INIT
;
13
17
abstract
class
RFC5656
implements
\fpoirotte\Pssht\Messages\MessageInterface
18
{
20
protected
$Q
;
21
22
29
public
function
__construct
(
30
\
fpoirotte
\Pssht\ECC\Point
$Q
31
) {
32
$this->Q =
$Q
;
33
}
34
35
public
static
function
getMessageId
()
36
{
37
return
30;
38
}
39
40
public
function
serialize
(\
fpoirotte
\Pssht\Wire\
Encoder
$encoder)
41
{
42
$encoder->encodeString($this->Q->serialize(static::getCurve()));
43
return
$this;
44
}
45
46
public
static
function
unserialize
(\
fpoirotte
\Pssht\Wire\
Decoder
$decoder)
47
{
48
$point = \fpoirotte\Pssht\ECC\Point::unserialize(
49
static::getCurve(),
50
$decoder->decodeString()
51
);
52
return
new
static
($point);
53
}
54
62
public
function
getQ
()
63
{
64
return
$this->Q
;
65
}
66
77
protected
static
function
getCurve
()
78
{
79
throw
new \RuntimeException();
80
}
81
}
fpoirotte\Pssht\Messages\MessageInterface
Definition:
MessageInterface.php:17
fpoirotte\Pssht\Messages\KEX\ECDH\INIT\RFC5656\getMessageId
static getMessageId()
Definition:
RFC5656.php:35
fpoirotte\Pssht\Messages\KEX\ECDH\INIT\RFC5656\getCurve
static getCurve()
Definition:
RFC5656.php:77
fpoirotte\Pssht\Messages\KEX\ECDH\INIT\RFC5656
Definition:
RFC5656.php:17
fpoirotte\Pssht\Wire\Decoder
Definition:
Decoder.php:17
fpoirotte\Pssht\Messages\KEX\ECDH\INIT
Definition:
Curve25519.php:12
fpoirotte\Pssht\Messages\KEX\ECDH\INIT\RFC5656\getQ
getQ()
Definition:
RFC5656.php:62
fpoirotte\Pssht\Messages\KEX\ECDH\INIT\RFC5656\$Q
$Q
Client's ephemeral public key as an EC Point.
Definition:
RFC5656.php:20
fpoirotte\Pssht\Wire\Encoder
Definition:
Encoder.php:17
fpoirotte\Pssht\Messages\KEX\ECDH\INIT\RFC5656\unserialize
static unserialize(\fpoirotte\Pssht\Wire\Decoder $decoder)
Definition:
RFC5656.php:46
fpoirotte\Pssht\Messages\KEX\ECDH\INIT\RFC5656\__construct
__construct(\fpoirotte\Pssht\ECC\Point $Q)
Definition:
RFC5656.php:29
fpoirotte
fpoirotte\Pssht\Messages\KEX\ECDH\INIT\RFC5656\serialize
serialize(\fpoirotte\Pssht\Wire\Encoder $encoder)
Definition:
RFC5656.php:40
src
Messages
KEX
ECDH
INIT
RFC5656.php
Generated on Tue May 9 2017 12:09:56 for pssht by
1.8.11