[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

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

   1  <?php
   2  
   3  /**
   4   * ECPrivateKey
   5   *
   6   * From: https://tools.ietf.org/html/rfc5915
   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   * ECPrivateKey
  22   *
  23   * @author  Jim Wigginton <terrafrost@php.net>
  24   */
  25  abstract class ECPrivateKey
  26  {
  27      const MAP = [
  28          'type' => ASN1::TYPE_SEQUENCE,
  29          'children' => [
  30              'version' => [
  31                  'type' => ASN1::TYPE_INTEGER,
  32                  'mapping' => [1 => 'ecPrivkeyVer1']
  33              ],
  34              'privateKey' => ['type' => ASN1::TYPE_OCTET_STRING],
  35              'parameters' => [
  36                  'constant' => 0,
  37                  'optional' => true,
  38                  'explicit' => true
  39              ] + ECParameters::MAP,
  40              'publicKey' => [
  41                  'type' => ASN1::TYPE_BIT_STRING,
  42                  'constant' => 1,
  43                  'optional' => true,
  44                  'explicit' => true
  45              ]
  46          ]
  47      ];
  48  }