[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/joomla/crypt/src/ -> Key.php (source)

   1  <?php
   2  /**
   3   * Part of the Joomla Framework Crypt Package
   4   *
   5   * @copyright  Copyright (C) 2005 - 2021 Open Source Matters, Inc. All rights reserved.
   6   * @license    GNU General Public License version 2 or later; see LICENSE
   7   */
   8  
   9  namespace Joomla\Crypt;
  10  
  11  /**
  12   * Encryption key object for the Joomla Framework.
  13   *
  14   * @since  1.0
  15   */
  16  class Key
  17  {
  18      /**
  19       * The private key.
  20       *
  21       * @var    string
  22       * @since  1.0
  23       */
  24      private $private;
  25  
  26      /**
  27       * The public key.
  28       *
  29       * @var    string
  30       * @since  1.0
  31       */
  32      private $public;
  33  
  34      /**
  35       * The key type.
  36       *
  37       * @var    string
  38       * @since  1.0
  39       */
  40      private $type;
  41  
  42      /**
  43       * Constructor.
  44       *
  45       * @param   string  $type     The key type.
  46       * @param   string  $private  The private key.
  47       * @param   string  $public   The public key.
  48       *
  49       * @since   1.0
  50       */
  51  	public function __construct(string $type, string $private, string $public)
  52      {
  53          // Set the key type.
  54          $this->type = $type;
  55  
  56          // Set the public/private key strings.
  57          $this->private = $private;
  58          $this->public  = $public;
  59      }
  60  
  61      /**
  62       * Retrieve the private key
  63       *
  64       * @return  string
  65       *
  66       * @since   2.0.0
  67       */
  68  	public function getPrivate(): string
  69      {
  70          return $this->private;
  71      }
  72  
  73      /**
  74       * Retrieve the public key
  75       *
  76       * @return  string
  77       *
  78       * @since   2.0.0
  79       */
  80  	public function getPublic(): string
  81      {
  82          return $this->public;
  83      }
  84  
  85      /**
  86       * Retrieve the key type
  87       *
  88       * @return  string
  89       *
  90       * @since   2.0.0
  91       */
  92  	public function getType(): string
  93      {
  94          return $this->type;
  95      }
  96  }


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