pssht  latest
SSH server library written in PHP
Arcfour256.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 
19 {
20  public function __construct($iv, $key)
21  {
22  parent::__construct($iv, $key);
23  // See section 4 of RFC 4345 for the rationale.
24  $this->encrypt(0, str_repeat(' ', 1536));
25  }
26 
27  public static function getAlgorithm()
28  {
29  return 'MCRYPT_ARCFOUR';
30  }
31 
32  public static function getName()
33  {
34  return 'arcfour256';
35  }
36 
37  public static function getKeySize()
38  {
39  return 256 >> 3;
40  }
41 }
static getName()
Return the name of the algorithm.
Definition: Arcfour256.php:32
encrypt($seqno, $data)
Definition: Base.php:83