[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/Reductions/ -> Classic.php (source)

   1  <?php
   2  
   3  /**
   4   * PHP Classic Modular Exponentiation Engine
   5   *
   6   * PHP version 5 and 7
   7   *
   8   * @category  Math
   9   * @package   BigInteger
  10   * @author    Jim Wigginton <[email protected]>
  11   * @copyright 2017 Jim Wigginton
  12   * @license   http://www.opensource.org/licenses/mit-license.html  MIT License
  13   * @link      http://pear.php.net/package/Math_BigInteger
  14   */
  15  
  16  namespace phpseclib3\Math\BigInteger\Engines\PHP\Reductions;
  17  
  18  use phpseclib3\Math\BigInteger\Engines\PHP\Base;
  19  
  20  /**
  21   * PHP Classic Modular Exponentiation Engine
  22   *
  23   * @package PHP
  24   * @author  Jim Wigginton <[email protected]>
  25   * @access  public
  26   */
  27  abstract class Classic extends Base
  28  {
  29      /**
  30       * Regular Division
  31       *
  32       * @param array $x
  33       * @param array $n
  34       * @param string $class
  35       * @return array
  36       */
  37      protected static function reduce(array $x, array $n, $class)
  38      {
  39          $lhs = new $class();
  40          $lhs->value = $x;
  41          $rhs = new $class();
  42          $rhs->value = $n;
  43          list(, $temp) = $lhs->divide($rhs);
  44          return $temp->value;
  45      }
  46  }


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