Documentation

BinaryField extends FiniteField
in package

Binary 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
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
string

base2ToBase256()

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
string

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(string $num) : object
Parameters
$num : string
Return values
object

randomInteger()

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

public randomInteger() : object
Return values
object

        
On this page

Search results