pssht  latest
SSH server library written in PHP
Curve25519.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 
13 
18 {
19  protected function createResponse(
20  \fpoirotte\Pssht\Wire\Decoder $decoder,
21  \fpoirotte\Pssht\Transport $transport,
22  array &$context,
23  $hostAlgo
24  ) {
25  $kexAlgo = $context['kexAlgo'];
26  $kexAlgo = new $kexAlgo();
28 
29  return new \fpoirotte\Pssht\Messages\KEX\ECDH\REPLY\Curve25519(
30  $message,
31  $context['serverKeys'][$hostAlgo],
32  $transport->getEncryptor(),
33  $kexAlgo,
34  $context['kex']['server'],
35  $context['kex']['client'],
36  $context['identity']['server'],
37  $context['identity']['client']
38  );
39  }
40 }
static unserialize(\fpoirotte\Pssht\Wire\Decoder $decoder)
Definition: Curve25519.php:46