|
Bouncy Castle Cryptography Library 1.79 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface defines a finite field element. It is implemented by the
class GF2nElement
.
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 |
public java.lang.Object clone()
clone
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- the other objectpublic int hashCode()
hashCode
in class java.lang.Object
public boolean isZero()
public boolean isOne()
public GFElement add(GFElement addend) throws java.lang.RuntimeException
addend
- the addendpublic void addToThis(GFElement addend) throws java.lang.RuntimeException
addend
- the addendpublic GFElement subtract(GFElement minuend) throws java.lang.RuntimeException
minuend
- the minuendpublic void subtractFromThis(GFElement minuend)
minuend
- the minuendpublic GFElement multiply(GFElement factor) throws java.lang.RuntimeException
factor
- the factorpublic void multiplyThisBy(GFElement factor) throws java.lang.RuntimeException
factor
- the factorpublic GFElement invert() throws java.lang.ArithmeticException
java.lang.ArithmeticException
- if this is the zero element.public java.math.BigInteger toFlexiBigInt()
public byte[] toByteArray()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(int radix)
radix
- specifies the radix of the String representation
|
Bouncy Castle Cryptography Library 1.79 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |