PrimeField

Extends\phpseclib3\Math\Common\FiniteField

Prime Finite Fields

author

Jim Wigginton terrafrost@php.net

package

Default

Methods

Default constructor

__construct(\phpseclib3\Math\BigInteger $modulo)

Arguments

Destructor

__destruct()

Returns the length of the modulo in bits

getLength(): integer

Response

integer

Returns the length of the modulo in bytes

getLengthInBytes(): integer

Response

integer

Returns an instance of a dynamically generated PrimeFieldInteger class

newInteger(\phpseclib3\Math\BigInteger $num): Integer

Arguments

Response

Integer

Returns an integer on the finite field between one and the prime modulo

randomInteger(): Integer

Response

Integer

Use a custom defined modular reduction function

setReduction(\Closure $func): void

Arguments

$func

\Closure

Properties

Instance Counter

instanceCounter :integer
static
var

Type(s)

integer

Keeps track of current instance

instanceID :integer
var

Type(s)

integer