Rev 846 | Rev 1042 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
827 | daniel-mar | 1 | <?php |
2 | |||
3 | /** |
||
4 | * EC Parameters |
||
5 | * |
||
874 | daniel-mar | 6 | * @category Crypt |
7 | * @package EC |
||
827 | daniel-mar | 8 | * @author Jim Wigginton <terrafrost@php.net> |
9 | * @copyright 2015 Jim Wigginton |
||
10 | * @license http://www.opensource.org/licenses/mit-license.html MIT License |
||
11 | * @link http://phpseclib.sourceforge.net |
||
12 | */ |
||
13 | |||
14 | namespace phpseclib3\Crypt\EC; |
||
15 | |||
16 | use phpseclib3\Crypt\EC; |
||
17 | |||
18 | /** |
||
19 | * EC Parameters |
||
20 | * |
||
874 | daniel-mar | 21 | * @package EC |
827 | daniel-mar | 22 | * @author Jim Wigginton <terrafrost@php.net> |
874 | daniel-mar | 23 | * @access public |
827 | daniel-mar | 24 | */ |
25 | class Parameters extends EC |
||
26 | { |
||
27 | /** |
||
28 | * Returns the parameters |
||
29 | * |
||
30 | * @param string $type |
||
31 | * @param array $options optional |
||
32 | * @return string |
||
33 | */ |
||
34 | public function toString($type = 'PKCS1', array $options = []) |
||
35 | { |
||
36 | $type = self::validatePlugin('Keys', 'PKCS1', 'saveParameters'); |
||
37 | |||
38 | return $type::saveParameters($this->curve, $options); |
||
39 | } |
||
40 | } |