BinaryField
extends FiniteField
in package
Binary Finite Fields
Tags
Table of Contents
Properties
- $instanceID : int
- Keeps track of current instance
- $instanceCounter : int
- Instance Counter
Methods
- __construct() : mixed
- Default constructor
- base256ToBase2() : string
- Converts a base-256 string to a base-2 string
- base2ToBase256() : string
- Converts a base-2 string to a base-256 string
- 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
Properties
$instanceID
Keeps track of current instance
protected
int
$instanceID
$instanceCounter
Instance Counter
private
static int
$instanceCounter
= 0
Methods
__construct()
Default constructor
public
__construct(mixed ...$indices) : mixed
Parameters
- $indices : mixed
base256ToBase2()
Converts a base-256 string to a base-2 string
public
static base256ToBase2(string $x) : string
Parameters
- $x : string
Return values
stringbase2ToBase256()
Converts a base-2 string to a base-256 string
public
static base2ToBase256(string $x[, int $size = null ]) : string
Parameters
- $x : string
- $size : int = null
Return values
stringgetLength()
Returns the length of the modulo in bits
public
getLength() : int
Return values
intgetLengthInBytes()
Returns the length of the modulo in bytes
public
getLengthInBytes() : int
Return values
intnewInteger()
Returns an instance of a dynamically generated PrimeFieldInteger class
public
newInteger(string $num) : object
Parameters
- $num : string
Return values
objectrandomInteger()
Returns an integer on the finite field between one and the prime modulo
public
randomInteger() : object