BinaryField
class BinaryField extends FiniteField (View source)
Binary Finite Fields
Properties
protected int | $instanceID | Keeps track of current instance |
Methods
Default constructor
Returns an instance of a dynamically generated PrimeFieldInteger class
Returns an integer on the finite field between one and the prime modulo
Returns the length of the modulo in bytes
Returns the length of the modulo in bits
Converts a base-2 string to a base-256 string
Converts a base-256 string to a base-2 string
Details
__construct(...$indices)
Default constructor
object
newInteger(string $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
static string
base2ToBase256(string $x, int $size = null)
Converts a base-2 string to a base-256 string
static string
base256ToBase2(string $x)
Converts a base-256 string to a base-2 string