Subversion Repositories oidplus

Rev

Rev 874 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. <?php
  2.  
  3. /**
  4.  * DSA Parameters
  5.  *
  6.  * @author    Jim Wigginton <terrafrost@php.net>
  7.  * @copyright 2015 Jim Wigginton
  8.  * @license   http://www.opensource.org/licenses/mit-license.html  MIT License
  9.  * @link      http://phpseclib.sourceforge.net
  10.  */
  11.  
  12. namespace phpseclib3\Crypt\DSA;
  13.  
  14. use phpseclib3\Crypt\DSA;
  15.  
  16. /**
  17.  * DSA Parameters
  18.  *
  19.  * @author  Jim Wigginton <terrafrost@php.net>
  20.  */
  21. class Parameters extends DSA
  22. {
  23.     /**
  24.      * Returns the parameters
  25.      *
  26.      * @param string $type
  27.      * @param array $options optional
  28.      * @return string
  29.      */
  30.     public function toString($type = 'PKCS1', array $options = [])
  31.     {
  32.         $type = self::validatePlugin('Keys', 'PKCS1', 'saveParameters');
  33.  
  34.         return $type::saveParameters($this->p, $this->q, $this->g, $options);
  35.     }
  36. }
  37.