1<?php
2
3/**
4 * EC Parameters
5 *
6 * @category  Crypt
7 * @package   EC
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
14namespace phpseclib3\Crypt\EC;
15
16use phpseclib3\Crypt\EC;
17
18/**
19 * EC Parameters
20 *
21 * @package EC
22 * @author  Jim Wigginton <terrafrost@php.net>
23 * @access  public
24 */
25class 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}
41