|
Bouncy Castle Cryptography 1.48 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GFElement
This interface defines a finite field element. It is implemented by the
classes GFPElement
and GF2nElement
.
GFPElement
,
GF2nElement
Method Summary | |
---|---|
GFElement |
add(GFElement addend)
Compute the sum of this element and the addend. |
void |
addToThis(GFElement addend)
Compute the sum of this element and the addend, overwriting this element. |
java.lang.Object |
clone()
|
boolean |
equals(java.lang.Object other)
Compare this curve with another object. |
int |
hashCode()
|
GFElement |
invert()
Compute the multiplicative inverse of this element. |
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). |
GFElement |
subtract(GFElement minuend)
Compute the difference of this element and minuend. |
void |
subtractFromThis(GFElement minuend)
Compute the difference of this element and minuend, overwriting this element. |
byte[] |
toByteArray()
Returns this element as byte array. |
java.math.BigInteger |
toFlexiBigInt()
Returns this element as FlexiBigInt. |
java.lang.String |
toString()
Return a String representation of this element. |
java.lang.String |
toString(int radix)
Return a String representation of this element. |
Method Detail |
---|
java.lang.Object clone()
boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- the other object
int hashCode()
hashCode
in class java.lang.Object
boolean isZero()
boolean isOne()
GFElement add(GFElement addend) throws java.lang.RuntimeException
addend
- the addend
DifferentFieldsException
- if the elements are of different fields.
java.lang.RuntimeException
void addToThis(GFElement addend) throws java.lang.RuntimeException
addend
- the addend
DifferentFieldsException
- if the elements are of different fields.
java.lang.RuntimeException
GFElement subtract(GFElement minuend) throws java.lang.RuntimeException
minuend
- the minuend
DifferentFieldsException
- if the elements are of different fields.
java.lang.RuntimeException
void subtractFromThis(GFElement minuend)
minuend
- the minuend
DifferentFieldsException
- if the elements are of different fields.GFElement multiply(GFElement factor) throws java.lang.RuntimeException
factor
- the factor
DifferentFieldsException
- if the elements are of different fields.
java.lang.RuntimeException
void multiplyThisBy(GFElement factor) throws java.lang.RuntimeException
factor
- the factor
DifferentFieldsException
- if the elements are of different fields.
java.lang.RuntimeException
GFElement invert() throws java.lang.ArithmeticException
java.lang.ArithmeticException
- if this is the zero element.java.math.BigInteger toFlexiBigInt()
byte[] toByteArray()
java.lang.String toString()
toString
in class java.lang.Object
java.lang.String toString(int radix)
radix
- specifies the radix of the String representation
|
Bouncy Castle Cryptography 1.48 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |