PrimeField
class PrimeField extends FiniteField (View source)
Prime Finite Fields
Properties
protected int | $instanceID | Keeps track of current instance |
Methods
setReduction(callable $func)
Use a custom defined modular reduction function
object
object
randomInteger()
Returns an integer on the finite field between one and the prime modulo
int
getLengthInBytes()
Returns the length of the modulo in bytes
int
getLength()
Returns the length of the modulo in bits
Details
__construct(BigInteger $modulo)
Default constructor
setReduction(callable $func)
Use a custom defined modular reduction function
object
newInteger(BigInteger $num)
Returns an instance of a dynamically generated PrimeFieldInteger class
object
randomInteger()
Returns an integer on the finite field between one and the prime modulo
int
getLengthInBytes()
Returns the length of the modulo in bytes
int
getLength()
Returns the length of the modulo in bits