[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/fgrosse/phpasn1/lib/X509/ -> PrivateKey.php (source)

   1  <?php
   2  /*
   3   * This file is part of the PHPASN1 library.
   4   *
   5   * Copyright © Friedrich Große <[email protected]>
   6   *
   7   * For the full copyright and license information, please view the LICENSE
   8   * file that was distributed with this source code.
   9   */
  10  
  11  namespace FG\X509;
  12  
  13  use FG\ASN1\OID;
  14  use FG\ASN1\Universal\NullObject;
  15  use FG\ASN1\Universal\Sequence;
  16  use FG\ASN1\Universal\BitString;
  17  use FG\ASN1\Universal\ObjectIdentifier;
  18  
  19  class PrivateKey extends Sequence
  20  {
  21      /**
  22       * @param string $hexKey
  23       * @param \FG\ASN1\ASNObject|string $algorithmIdentifierString
  24       */
  25      public function __construct($hexKey, $algorithmIdentifierString = OID::RSA_ENCRYPTION)
  26      {
  27          parent::__construct(
  28              new Sequence(
  29                  new ObjectIdentifier($algorithmIdentifierString),
  30                  new NullObject()
  31              ),
  32              new BitString($hexKey)
  33          );
  34      }
  35  }


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer