2019-05-19 22:35:29 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ECDSA Parameters
|
|
|
|
*
|
|
|
|
* @category Crypt
|
|
|
|
* @package ECDSA
|
|
|
|
* @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
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace phpseclib\Crypt\ECDSA;
|
|
|
|
|
|
|
|
use phpseclib\Crypt\ECDSA;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ECDSA Parameters
|
|
|
|
*
|
|
|
|
* @package ECDSA
|
|
|
|
* @author Jim Wigginton <terrafrost@php.net>
|
|
|
|
* @access public
|
|
|
|
*/
|
|
|
|
class Parameters extends ECDSA
|
|
|
|
{
|
|
|
|
/**
|
2019-06-01 20:23:11 +02:00
|
|
|
* Returns the parameters
|
2019-05-19 22:35:29 +02:00
|
|
|
*
|
|
|
|
* @param string $type
|
2019-06-01 20:23:11 +02:00
|
|
|
* @param array $options optional
|
2019-05-19 22:35:29 +02:00
|
|
|
* @return string
|
|
|
|
*/
|
2019-06-02 17:02:30 +02:00
|
|
|
public function toString($type = 'PKCS1', array $options = [])
|
2019-05-19 22:35:29 +02:00
|
|
|
{
|
|
|
|
$type = self::validatePlugin('Keys', 'PKCS1', 'saveParameters');
|
|
|
|
|
2019-06-01 20:23:11 +02:00
|
|
|
return $type::saveParameters($this->curve, $options);
|
2019-05-19 22:35:29 +02:00
|
|
|
}
|
|
|
|
}
|