2019-05-19 20:35:29 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
2019-06-28 00:10:40 +00:00
|
|
|
* EC Parameters
|
2019-05-19 20:35:29 +00:00
|
|
|
*
|
|
|
|
* @author Jim Wigginton <terrafrost@php.net>
|
|
|
|
* @copyright 2015 Jim Wigginton
|
|
|
|
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
|
|
|
* @link http://phpseclib.sourceforge.net
|
|
|
|
*/
|
|
|
|
|
2022-06-04 15:31:21 +00:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2019-11-07 05:41:40 +00:00
|
|
|
namespace phpseclib3\Crypt\EC;
|
2019-05-19 20:35:29 +00:00
|
|
|
|
2019-11-07 05:41:40 +00:00
|
|
|
use phpseclib3\Crypt\EC;
|
2019-05-19 20:35:29 +00:00
|
|
|
|
|
|
|
/**
|
2019-06-28 00:10:40 +00:00
|
|
|
* EC Parameters
|
2019-05-19 20:35:29 +00:00
|
|
|
*
|
|
|
|
* @author Jim Wigginton <terrafrost@php.net>
|
|
|
|
*/
|
2023-02-05 23:44:51 +00:00
|
|
|
final class Parameters extends EC
|
2019-05-19 20:35:29 +00:00
|
|
|
{
|
|
|
|
/**
|
2019-06-01 18:23:11 +00:00
|
|
|
* Returns the parameters
|
2019-05-19 20:35:29 +00:00
|
|
|
*
|
2019-06-01 18:23:11 +00:00
|
|
|
* @param array $options optional
|
2019-05-19 20:35:29 +00:00
|
|
|
*/
|
2022-06-04 15:31:21 +00:00
|
|
|
public function toString(string $type = 'PKCS1', array $options = []): string
|
2019-05-19 20:35:29 +00:00
|
|
|
{
|
|
|
|
$type = self::validatePlugin('Keys', 'PKCS1', 'saveParameters');
|
|
|
|
|
2019-06-01 18:23:11 +00:00
|
|
|
return $type::saveParameters($this->curve, $options);
|
2019-05-19 20:35:29 +00:00
|
|
|
}
|
|
|
|
}
|