Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Référence de la classe Base
+ Graphe d'héritage de Base:

Fonctions membres publiques statiques

static isValidEngine ()
 
- Fonctions membres publiques statiques hérités de PHP
static subtractHelper (array $x_value, $x_negative, array $y_value, $y_negative)
 
static scan1divide (PHP $r)
 
- Fonctions membres publiques statiques hérités de Engine
static setModExpEngine ($engine)
 
static minMaxBits ($bits)
 

Champs de données

const VARIABLE = 0
 
const DATA = 1
 
- Champs de données hérités de PHP
const VALUE = 0
 
const SIGN = 1
 
const KARATSUBA_CUTOFF = 25
 
const FAST_BITWISE = true
 
const ENGINE_DIR = 'PHP'
 
- Champs de données hérités de Engine
const PRIMES
 

Fonctions membres protégées statiques

static powModHelper (PHP $x, PHP $e, PHP $n, $class)
 
static prepareReduce (array $x, array $n, $class)
 
static multiplyReduce (array $x, array $y, array $n, $class)
 
static squareReduce (array $x, array $n, $class)
 
- Fonctions membres protégées statiques hérités de PHP
static addHelper (array $x_value, $x_negative, array $y_value, $y_negative)
 
static multiplyHelper (array $x_value, $x_negative, array $y_value, $y_negative)
 
static regularMultiply (array $x_value, array $y_value)
 
static compareHelper (array $x_value, $x_negative, array $y_value, $y_negative)
 
static trim (array $value)
 
static array_repeat ($input, $multiplier)
 
static square (array $x)
 
static baseSquare (array $value)
 
static karatsubaSquare (array $value)
 
- Fonctions membres protégées statiques hérités de Engine
static setBitmask ($bits)
 
static base256_lshift (&$x, $shift)
 
static slidingWindow (Engine $x, Engine $e, Engine $n, $class)
 
static randomRangePrimeOuter (Engine $min, Engine $max)
 
static randomRangeHelper (Engine $min, Engine $max)
 
static randomRangePrimeInner (Engine $x, Engine $min, Engine $max)
 
static minHelper (array $nums)
 
static maxHelper (array $nums)
 

Membres hérités additionnels

- Fonctions membres publiques hérités de PHP
 __construct ($x=0, $base=10)
 
 toString ()
 
 toBytes ($twos_compliment=false)
 
 abs ()
 
 bitwise_rightShift ($shift)
 
 bitwise_leftShift ($shift)
 
 isOdd ()
 
 testBit ($x)
 
 isNegative ()
 
 negate ()
 
 bitwise_split ($split)
 
- Fonctions membres publiques hérités de Engine
 __construct ($x=0, $base=10)
 
 toHex ($twos_compliment=false)
 
 toBits ($twos_compliment=false)
 
 __sleep ()
 
 __wakeup ()
 
 jsonSerialize ()
 
 __toString ()
 
 __debugInfo ()
 
 setPrecision ($bits)
 
 getPrecision ()
 
 bitwise_not ()
 
 bitwise_leftRotate ($shift)
 
 bitwise_rightRotate ($shift)
 
 getLength ()
 
 getLengthInBytes ()
 
 isPrime ($t=false)
 
 root ($n=2)
 
 createRecurringModuloFunction ()
 
 bitwise_split ($split)
 
- Fonctions membres protégées hérités de PHP
 initialize ($base)
 
 pad ($str)
 
 divideHelper (PHP $y)
 
 convertToObj (array $arr)
 
 normalize (PHP $result)
 
 lshift ($shift)
 
 rshift ($shift)
 
 powModInner (PHP $e, PHP $n)
 
 make_odd ()
 
 testSmallPrimes ()
 
 powHelper (PHP $n)
 
- Fonctions membres protégées hérités de Engine
 toBytesHelper ()
 
 powModOuter (Engine $e, Engine $n)
 
 setupIsPrime ()
 
 testPrimality ($t)
 
 rootHelper ($n)
 
 rootInner ($n)
 
 extendedGCDHelper (Engine $n)
 
 bitwiseAndHelper (Engine $x)
 
 bitwiseOrHelper (Engine $x)
 
 bitwiseXorHelper (Engine $x)
 
- Attributs protégés hérités de Engine
 $value
 
 $is_negative
 
 $precision = -1
 
 $bitmask = false
 
 $reduce
 
 $hex
 
- Attributs protégés statiques hérités de Engine
static $zero = []
 
static $one = []
 
static $two = []
 
static $modexpEngine
 
static $isValidEngine
 

Documentation des fonctions membres

◆ isValidEngine()

static isValidEngine ( )
static

Test for engine validity

Renvoie
bool

Références class.

◆ multiplyReduce()

static multiplyReduce ( array  $x,
array  $y,
array  $n,
  $class 
)
staticprotected

Modular multiply

Paramètres
array$x
array$y
array$n
string$class
Voir également
self::slidingWindow()
Renvoie
array

Références $class, $n, et $temp.

◆ powModHelper()

static powModHelper ( PHP  $x,
PHP  $e,
PHP  $n,
  $class 
)
staticprotected

Performs modular exponentiation.

The most naive approach to modular exponentiation has very unreasonable requirements, and and although the approach involving repeated squaring does vastly better, it, too, is impractical for our purposes. The reason being that division - by far the most complicated and time-consuming of the basic operations (eg. +,-,*,/) - occurs multiple times within it.

Modular reductions resolve this issue. Although an individual modular reduction takes more time then an individual division, when performed in succession (with the same modulo), they're a lot faster.

The two most commonly used modular reductions are Barrett and Montgomery reduction. Montgomery reduction, although faster, only works when the gcd of the modulo and of the base being used is 1. In RSA, when the base is a power of two, the modulo - a product of two primes - is always going to have a gcd of 1 (because the product of two odd numbers is odd), but what about when RSA isn't used?

In contrast, Barrett reduction has no such constraint. As such, some bigint implementations perform a Barrett reduction after every operation in the modpow function. Others perform Barrett reductions when the modulo is even and Montgomery reductions when the modulo is odd. BigInteger.java's modPow method, however, uses a trick involving the Chinese Remainder Theorem to factor the even modulo into two numbers - one odd and the other, a power of two - and recombine them, later. This is the method that this modPow function uses. Montgomery Reduction with Even Modulus elaborates.

Paramètres
PHP$x
PHP$e
PHP$n
string$class
Renvoie
PHP

Références $class, $n, $temp, et PHP\normalize().

Référencé par PHP\powModInner().

◆ prepareReduce()

static prepareReduce ( array  $x,
array  $n,
  $class 
)
staticprotected

Modular reduction preparation

Paramètres
array$x
array$n
string$class
Voir également
self::slidingWindow()
Renvoie
array

Références $class, et $n.

◆ squareReduce()

static squareReduce ( array  $x,
array  $n,
  $class 
)
staticprotected

Modular square

Paramètres
array$x
array$n
string$class
Voir également
self::slidingWindow()
Renvoie
array

Références $class, et $n.

Documentation des champs

◆ DATA

const DATA = 1

$cache[self::DATA] contains the cached data.

private

◆ VARIABLE

const VARIABLE = 0

Cache constants

$cache[self::VARIABLE] tells us whether or not the cached data is still valid.

private


La documentation de cette classe a été générée à partir du fichier suivant :