Documentation

PrimeField extends FiniteField
in package

Prime Finite Fields

Tags
author

Jim Wigginton terrafrost@php.net

access

public

Table of Contents

Properties

$instanceID  : int
Keeps track of current instance
$instanceCounter  : int
Instance Counter

Methods

__construct()  : mixed
Default constructor
getLength()  : int
Returns the length of the modulo in bits
getLengthInBytes()  : int
Returns the length of the modulo in bytes
newInteger()  : object
Returns an instance of a dynamically generated PrimeFieldInteger class
randomInteger()  : object
Returns an integer on the finite field between one and the prime modulo
setReduction()  : mixed
Use a custom defined modular reduction function

Properties

$instanceID

Keeps track of current instance

protected int $instanceID

$instanceCounter

Instance Counter

private static int $instanceCounter = 0

Methods

getLength()

Returns the length of the modulo in bits

public getLength() : int
Return values
int

getLengthInBytes()

Returns the length of the modulo in bytes

public getLengthInBytes() : int
Return values
int

newInteger()

Returns an instance of a dynamically generated PrimeFieldInteger class

public newInteger(BigInteger $num) : object
Parameters
$num : BigInteger
Return values
object

randomInteger()

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

public randomInteger() : object
Return values
object

setReduction()

Use a custom defined modular reduction function

public setReduction(callable $func) : mixed
Parameters
$func : callable

        
On this page

Search results