[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/sodium_compat/src/Core/Curve25519/Ge/ -> P3.php (source)

   1  <?php
   2  
   3  if (class_exists('ParagonIE_Sodium_Core_Curve25519_Ge_P3', false)) {
   4      return;
   5  }
   6  
   7  /**
   8   * Class ParagonIE_Sodium_Core_Curve25519_Ge_P3
   9   */
  10  class ParagonIE_Sodium_Core_Curve25519_Ge_P3
  11  {
  12      /**
  13       * @var ParagonIE_Sodium_Core_Curve25519_Fe
  14       */
  15      public $X;
  16  
  17      /**
  18       * @var ParagonIE_Sodium_Core_Curve25519_Fe
  19       */
  20      public $Y;
  21  
  22      /**
  23       * @var ParagonIE_Sodium_Core_Curve25519_Fe
  24       */
  25      public $Z;
  26  
  27      /**
  28       * @var ParagonIE_Sodium_Core_Curve25519_Fe
  29       */
  30      public $T;
  31  
  32      /**
  33       * ParagonIE_Sodium_Core_Curve25519_Ge_P3 constructor.
  34       *
  35       * @internal You should not use this directly from another application
  36       *
  37       * @param ParagonIE_Sodium_Core_Curve25519_Fe|null $x
  38       * @param ParagonIE_Sodium_Core_Curve25519_Fe|null $y
  39       * @param ParagonIE_Sodium_Core_Curve25519_Fe|null $z
  40       * @param ParagonIE_Sodium_Core_Curve25519_Fe|null $t
  41       */
  42      public function __construct(
  43          $x = null,
  44          $y = null,
  45          $z = null,
  46          $t = null
  47      ) {
  48          if ($x === null) {
  49              $x = new ParagonIE_Sodium_Core_Curve25519_Fe();
  50          }
  51          if (!($x instanceof ParagonIE_Sodium_Core_Curve25519_Fe)) {
  52              throw new TypeError('Argument 1 must be an instance of ParagonIE_Sodium_Core_Curve25519_Fe');
  53          }
  54          $this->X = $x;
  55          if ($y === null) {
  56              $y = new ParagonIE_Sodium_Core_Curve25519_Fe();
  57          }
  58          if (!($y instanceof ParagonIE_Sodium_Core_Curve25519_Fe)) {
  59              throw new TypeError('Argument 2 must be an instance of ParagonIE_Sodium_Core_Curve25519_Fe');
  60          }
  61          $this->Y = $y;
  62          if ($z === null) {
  63              $z = new ParagonIE_Sodium_Core_Curve25519_Fe();
  64          }
  65          if (!($z instanceof ParagonIE_Sodium_Core_Curve25519_Fe)) {
  66              throw new TypeError('Argument 3 must be an instance of ParagonIE_Sodium_Core_Curve25519_Fe');
  67          }
  68          $this->Z = $z;
  69          if ($t === null) {
  70              $t = new ParagonIE_Sodium_Core_Curve25519_Fe();
  71          }
  72          if (!($t instanceof ParagonIE_Sodium_Core_Curve25519_Fe)) {
  73              throw new TypeError('Argument 4 must be an instance of ParagonIE_Sodium_Core_Curve25519_Fe');
  74          }
  75          $this->T = $t;
  76      }
  77  }


Generated : Sun Dec 22 08:20:01 2024 Cross-referenced by PHPXref