[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/ -> RSASSA_PSS_params.php (source)

   1  <?php
   2  
   3  /**
   4   * RSASSA_PSS_params
   5   *
   6   * As defined in https://tools.ietf.org/html/rfc4055#section-3.1
   7   *
   8   * PHP version 5
   9   *
  10   * @author    Jim Wigginton <terrafrost@php.net>
  11   * @copyright 2016 Jim Wigginton
  12   * @license   http://www.opensource.org/licenses/mit-license.html  MIT License
  13   * @link      http://phpseclib.sourceforge.net
  14   */
  15  
  16  namespace phpseclib3\File\ASN1\Maps;
  17  
  18  use phpseclib3\File\ASN1;
  19  
  20  /**
  21   * RSASSA_PSS_params
  22   *
  23   * @author  Jim Wigginton <terrafrost@php.net>
  24   */
  25  abstract class RSASSA_PSS_params
  26  {
  27      const MAP = [
  28          'type' => ASN1::TYPE_SEQUENCE,
  29          'children' => [
  30              'hashAlgorithm' => [
  31                  'constant' => 0,
  32                  'optional' => true,
  33                  'explicit' => true,
  34                  //'default'  => 'sha1Identifier'
  35              ] + HashAlgorithm::MAP,
  36              'maskGenAlgorithm' => [
  37                  'constant' => 1,
  38                  'optional' => true,
  39                  'explicit' => true,
  40                  //'default'  => 'mgf1SHA1Identifier'
  41              ] + MaskGenAlgorithm::MAP,
  42              'saltLength' => [
  43                  'type' => ASN1::TYPE_INTEGER,
  44                  'constant' => 2,
  45                  'optional' => true,
  46                  'explicit' => true,
  47                  'default' => 20
  48              ],
  49              'trailerField' => [
  50                  'type' => ASN1::TYPE_INTEGER,
  51                  'constant' => 3,
  52                  'optional' => true,
  53                  'explicit' => true,
  54                  'default' => 1
  55              ]
  56          ]
  57      ];
  58  }