public class GF2nONBElement extends GF2nElement
GF2nField,
GF2nElementmDegree, mField| Constructor and Description |
|---|
GF2nONBElement(GF2nONBElement gf2n)
Copy constructor.
|
GF2nONBElement(GF2nONBField gf2n,
BigInteger val)
Construct the element of the field gf2n with the specified
value val.
|
GF2nONBElement(GF2nONBField gf2n,
byte[] e)
Construct a new GF2nONBElement from its encoding.
|
GF2nONBElement(GF2nONBField gf2n,
SecureRandom rand)
Construct a random element over the field gf2n, using the
specified source of randomness.
|
| Modifier and Type | Method and Description |
|---|---|
GFElement |
add(GFElement addend)
Compute the sum of this element and addend.
|
void |
addToThis(GFElement addend)
Compute this + addend (overwrite this).
|
Object |
clone()
Create a new GF2nONBElement by cloning this GF2nPolynomialElement.
|
boolean |
equals(Object other)
Compare this element with another object.
|
int |
hashCode() |
GF2nElement |
increase()
returns this element + 1.
|
void |
increaseThis()
increases this element.
|
GFElement |
invert()
Compute the multiplicative inverse of this element.
|
void |
invertThis()
Multiplicatively invert of this element (overwrite this).
|
boolean |
isOne()
Checks whether this element is one.
|
boolean |
isZero()
Checks whether this element is zero.
|
GFElement |
multiply(GFElement factor)
Compute the product of this element and factor.
|
void |
multiplyThisBy(GFElement factor)
Compute this * factor (overwrite this).
|
static GF2nONBElement |
ONE(GF2nONBField gf2n)
Create the one element.
|
GF2nElement |
solveQuadraticEquation()
Solves a quadratic equation.
Let z2 + z = this. |
GF2nElement |
square()
returns this element to the power of 2.
|
GF2nElement |
squareRoot()
returns the root ofthis element.
|
void |
squareRootThis()
square roots this element.
|
void |
squareThis()
squares this element.
|
boolean |
testRightmostBit()
Returns whether the highest bit of the bit representation is set
|
byte[] |
toByteArray()
Returns this element as byte array.
|
BigInteger |
toFlexiBigInt()
Returns this element as FlexiBigInt.
|
String |
toString()
Returns a String representation of this element.
|
String |
toString(int radix)
Returns a String representation of this element.
|
int |
trace()
Returns the trace of this element.
|
static GF2nONBElement |
ZERO(GF2nONBField gf2n)
Create the zero element.
|
convert, getField, subtract, subtractFromThispublic GF2nONBElement(GF2nONBField gf2n, SecureRandom rand)
gf2n - the fieldrand - the source of randomnesspublic GF2nONBElement(GF2nONBField gf2n, byte[] e)
gf2n - the fielde - the encoded elementpublic GF2nONBElement(GF2nONBField gf2n, BigInteger val)
gf2n - the fieldval - the value represented by a BigIntegerpublic GF2nONBElement(GF2nONBElement gf2n)
gf2n - the fieldpublic Object clone()
clone in interface GFElementclone in class GF2nElementpublic static GF2nONBElement ZERO(GF2nONBField gf2n)
gf2n - the finite fieldpublic static GF2nONBElement ONE(GF2nONBField gf2n)
gf2n - the finite fieldpublic boolean isZero()
public boolean isOne()
public boolean equals(Object other)
public int hashCode()
public boolean testRightmostBit()
testRightmostBit in class GF2nElementpublic GFElement add(GFElement addend) throws RuntimeException
addend - the addendRuntimeExceptionpublic void addToThis(GFElement addend) throws RuntimeException
addend - the addendRuntimeExceptionpublic GF2nElement increase()
increase in class GF2nElementpublic void increaseThis()
increaseThis in class GF2nElementpublic GFElement multiply(GFElement factor) throws RuntimeException
factor - the factorRuntimeExceptionpublic void multiplyThisBy(GFElement factor) throws RuntimeException
factor - the factorRuntimeExceptionpublic GF2nElement square()
square in class GF2nElementpublic void squareThis()
squareThis in class GF2nElementpublic GFElement invert() throws ArithmeticException
ArithmeticException - if this is the zero element.public void invertThis()
throws ArithmeticException
ArithmeticException - if this is the zero element.public GF2nElement squareRoot()
squareRoot in class GF2nElementpublic void squareRootThis()
squareRootThis in class GF2nElementpublic int trace()
trace in class GF2nElementpublic GF2nElement solveQuadraticEquation() throws RuntimeException
solveQuadraticEquation in class GF2nElementRuntimeExceptionpublic String toString()
public String toString(int radix)
radix - specifies the radix of the String representationpublic BigInteger toFlexiBigInt()
public byte[] toByteArray()
Copyright © 2015–2019 The veraPDF Consortium. All rights reserved.