[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

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


Generated : Thu Nov 21 08:20:01 2024 Cross-referenced by PHPXref