1
0
mirror of https://github.com/danog/tgseclib.git synced 2024-12-12 17:17:34 +01:00
tgseclib/phpseclib/Crypt/DH/Parameters.php
2019-08-06 22:10:56 -05:00

41 lines
846 B
PHP

<?php
/**
* DH Parameters
*
* @category Crypt
* @package DH
* @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\DH;
use phpseclib\Crypt\DH;
/**
* DH Parameters
*
* @package DH
* @author Jim Wigginton <terrafrost@php.net>
* @access public
*/
class Parameters extends DH
{
/**
* 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->prime, $this->base, $options);
}
}