2022-12-29 06:12:03 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* DSA Parameters
|
|
|
|
*
|
|
|
|
* @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 phpseclib3\Crypt\DSA;
|
|
|
|
|
|
|
|
use phpseclib3\Crypt\DSA;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* DSA Parameters
|
|
|
|
*
|
|
|
|
* @author Jim Wigginton <terrafrost@php.net>
|
|
|
|
*/
|
2023-10-24 07:46:36 +00:00
|
|
|
final class Parameters extends DSA
|
2022-12-29 06:12:03 +00:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Returns the parameters
|
|
|
|
*
|
|
|
|
* @param string $type
|
|
|
|
* @param array $options optional
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function toString($type = 'PKCS1', array $options = [])
|
|
|
|
{
|
|
|
|
$type = self::validatePlugin('Keys', 'PKCS1', 'saveParameters');
|
|
|
|
|
|
|
|
return $type::saveParameters($this->p, $this->q, $this->g, $options);
|
|
|
|
}
|
|
|
|
}
|