Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
__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 publiques statiques | |
static | setModExpEngine ($engine) |
static | minMaxBits ($bits) |
Champs de données | |
const | PRIMES |
Fonctions membres protégées | |
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) | |
Fonctions membres protégées statiques | |
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) |
Attributs protégés | |
$value | |
$is_negative | |
$precision = -1 | |
$bitmask = false | |
$reduce | |
$hex | |
Attributs protégés statiques | |
static | $zero = [] |
static | $one = [] |
static | $two = [] |
static | $modexpEngine |
static | $isValidEngine |
__construct | ( | $x = 0 , |
|
$base = 10 |
|||
) |
Default constructor
int | numeric-string | $x | integer Base-10 number or base-$base number if $base set. |
int | $base |
Références $base, Engine\$is_negative, $temp, BigInteger\abs(), BigInteger\add(), Strings\bits2bin(), class, Laminas\Diactoros\initialize(), null, et value.
__debugInfo | ( | ) |
__debugInfo() magic method
Will be called, automatically, when print_r() or var_dump() are called
Références Engine\$precision, $result, class, et Engine\toHex().
__sleep | ( | ) |
Serialize
Will be called, automatically, when serialize() is called on a BigInteger object.
Références Engine\toHex().
__toString | ( | ) |
__wakeup | ( | ) |
Serialize
Will be called, automatically, when unserialize() is called on a BigInteger object.
Références Engine\$hex, $temp, Engine\setPrecision(), et value.
|
staticprotected |
bitwise_leftRotate | ( | $shift | ) |
Logical Left Rotate
Instead of the top x bits being dropped they're appended to the shifted bit string.
int | $shift |
Références $i, Engine\$precision, $result, $temp, $this, BigInteger\bitwise_leftShift(), BigInteger\bitwise_rightShift(), et BigInteger\toBytes().
Référencé par Engine\bitwise_rightRotate().
bitwise_not | ( | ) |
bitwise_rightRotate | ( | $shift | ) |
Logical Right Rotate
Instead of the bottom x bits being dropped they're prepended to the shifted bit string.
int | $shift |
Références Engine\bitwise_leftRotate().
bitwise_split | ( | $split | ) |
|
protected |
Logical And
Engine | $x |
Références BigInteger\max(), et BigInteger\toBytes().
Référencé par PHP32\bitwise_and(), PHP64\bitwise_and(), et BCMath\bitwise_and().
|
protected |
Logical Or
Engine | $x |
Références BigInteger\max(), et BigInteger\toBytes().
Référencé par PHP32\bitwise_or(), et PHP64\bitwise_or().
|
protected |
Logical Exclusive Or
Engine | $x |
Références BigInteger\max(), et BigInteger\toBytes().
Référencé par BCMath\bitwise_or(), PHP32\bitwise_xor(), PHP64\bitwise_xor(), et BCMath\bitwise_xor().
createRecurringModuloFunction | ( | ) |
Create Recurring Modulo Function
Sometimes it may be desirable to do repeated modulos with the same number outside of modular exponentiation
Références $class, $n, $this, Engine\$value, et class.
|
protected |
Calculates the greatest common divisor and Bezout's identity.
Engine | $n |
Références $b, $c, $n, Engine\$one, $temp, $this, et Engine\$zero.
Référencé par PHP32\extendedGCD(), et PHP64\extendedGCD().
getLength | ( | ) |
getLengthInBytes | ( | ) |
Return the size of a BigInteger in bytes
Références BigInteger\toBytes().
Référencé par Engine\setupIsPrime().
getPrecision | ( | ) |
Get Precision
Returns the precision if it exists, -1 if it doesn't
Références Engine\$precision.
isPrime | ( | $t = false | ) |
Checks a numer to see if it's prime
Assuming the $t parameter is not set, this function has an error rate of 2**-80. The main motivation for the $t parameter is distributability. BigInteger::randomPrime() can be distributed across multiple pageloads on a website instead of just one.
int | bool | $t |
Références Engine\setupIsPrime(), et Engine\testPrimality().
Référencé par Engine\randomRangePrimeOuter().
jsonSerialize | ( | ) |
JSON Serialize
Will be called, automatically, when json_encode() is called on a BigInteger object.
Références Engine\$precision, $result, et Engine\toHex().
|
staticprotected |
Return the minimum BigInteger between an arbitrary number of BigIntegers.
array | $nums |
Références $i.
|
staticprotected |
Return the minimum BigInteger between an arbitrary number of BigIntegers.
array | $nums |
Références $i.
|
static |
Returns the smallest and largest n-bit number
int | $bits |
Performs some pre-processing for powMod
Références $n, $temp, et BigInteger\modInverse().
Référencé par PHP32\modPow(), PHP64\modPow(), GMP\modPow(), BCMath\modPow(), PHP32\powMod(), PHP64\powMod(), GMP\powMod(), et BCMath\powMod().
Generate a random number between a range
Returns a random number between $min and $max where $min and $max can be defined using one of the two methods:
BigInteger::randomRange($min, $max) BigInteger::randomRange($max, $min)
Performs some pre-processing for randomRangePrime
Références $temp, elseif, et Engine\isPrime().
root | ( | $n = 2 | ) |
Calculates the nth root of a biginteger.
int | $n |
Références Engine\rootHelper().
|
protected |
Performs a few preliminary checks on root
int | $n |
Références $n, class, BigInteger\compare(), et Engine\rootInner().
Référencé par Engine\root().
|
protected |
|
staticprotected |
Set Bitmask
int | $bits |
|
static |
Sets engine type.
Throws an exception if the type is invalid
class-string<Engine> | $engine |
Références class.
setPrecision | ( | $bits | ) |
Set Precision
Some bitwise operations give different results depending on the precision being used. Examples include left shift, not, and rotates.
int | $bits |
Références $temp, $this, et value.
Référencé par Engine\__wakeup().
|
protected |
Sets the $t parameter for primality testing
Références Engine\getLengthInBytes().
Référencé par Engine\isPrime().
Sliding Window k-ary Modular Exponentiation
Based on HAC 14.85 / MPM 7.7. In a departure from those algorithims, however, this function performs a modular reduction after every multiplication and squaring operation. As such, this function has the same preconditions that the reductions being used do.
T of Engine
Références $class, $i, $n, $result, $temp, class, et Engine\toBits().
|
protected |
Tests Primality
Uses the Miller-Rabin primality test. See HAC 4.24 for more info.
int | $t |
Références $i, $n, $r, $this, et class.
Référencé par Engine\isPrime().
toBits | ( | $twos_compliment = false | ) |
Converts a BigInteger to a bit string (eg. base-2).
Negative numbers are saved as positive numbers, unless $twos_compliment is set to true, at which point, they're saved as two's compliment.
bool | $twos_compliment |
Références Engine\$hex, $result, Strings\bin2bits(), BigInteger\compare(), et BigInteger\toBytes().
Référencé par Engine\getLength(), et Engine\slidingWindow().
|
protected |
Converts a BigInteger to a byte string (eg. base-256).
Negative numbers are saved as positive numbers, unless $twos_compliment is set to true, at which point, they're saved as two's compliment.
Références $temp, $this, BigInteger\add(), et BigInteger\compare().
Référencé par BCMath\toBytes(), GMP\toBytes(), et PHP\toBytes().
toHex | ( | $twos_compliment = false | ) |
Converts a BigInteger to a hex string (eg. base-16).
bool | $twos_compliment |
Références BigInteger\toBytes().
Référencé par Engine\__debugInfo(), Engine\__sleep(), Engine\jsonSerialize(), et GMP\toBits().
|
protected |
Référencé par GMP\normalize(), BCMath\normalize(), et PHP\normalize().
|
protected |
Référencé par Engine\__wakeup(), GMP\toBits(), et Engine\toBits().
|
protected |
Référencé par Engine\__construct(), et PHP\isNegative().
|
staticprotected |
|
staticprotected |
|
staticprotected |
Référencé par Engine\extendedGCDHelper(), OpenSSH\load(), et PuTTY\load().
|
protected |
|
protected |
|
staticprotected |
|
protected |
Référencé par BCMath\abs(), PHP\abs(), PHP\addHelper(), PHP\baseSquare(), PHP\bitwise_leftShift(), PHP\bitwise_rightShift(), PHP\bitwise_small_split(), PHP\bitwise_split(), GMP\createRecurringModuloFunction(), Engine\createRecurringModuloFunction(), BCMath\extendedGCD(), PHP32\initialize(), PHP64\initialize(), BCMath\initialize(), GMP\initialize(), PHP\initialize(), PHP\karatsubaSquare(), BCMath\negate(), GMP\negate(), PHP\normalize(), BCMath\testSmallPrimes(), PHP\testSmallPrimes(), BCMath\toBytes(), GMP\toString(), et PHP\trim().
|
staticprotected |
Référencé par Engine\extendedGCDHelper().
const PRIMES |