1<?php 2 3/** 4 * DSA Parameters 5 * 6 * @category Crypt 7 * @package DSA 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\DSA; 15 16use phpseclib3\Crypt\DSA; 17 18/** 19 * DSA Parameters 20 * 21 * @package DSA 22 * @author Jim Wigginton <terrafrost@php.net> 23 * @access public 24 */ 25class Parameters extends DSA 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->p, $this->q, $this->g, $options); 39 } 40} 41