|
Bouncy Castle Cryptography 1.50 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.bouncycastle.pqc.math.linearalgebra.Vector
org.bouncycastle.pqc.math.linearalgebra.GF2mVector
public class GF2mVector
This class implements vectors over the finite field
GF(2m) for small m (i.e.,
1<m<32). It extends the abstract class Vector.
| Field Summary |
|---|
| Fields inherited from class org.bouncycastle.pqc.math.linearalgebra.Vector |
|---|
length |
| Constructor Summary | |
|---|---|
GF2mVector(GF2mField field,
byte[] v)
creates the vector over GF(2^m) of given length and with elements from array v (beginning at the first bit) |
|
GF2mVector(GF2mField field,
int[] vector)
Create a new vector over GF(2m) of the given length and element array. |
|
GF2mVector(GF2mVector other)
Copy constructor. |
|
| Method Summary | |
|---|---|
Vector |
add(Vector addend)
Add another vector to this vector. |
boolean |
equals(java.lang.Object other)
Compare this vector with another object. |
byte[] |
getEncoded()
|
GF2mField |
getField()
|
int[] |
getIntArrayForm()
|
int |
hashCode()
|
boolean |
isZero()
Return whether this is the zero vector (i.e., all elements are zero). |
Vector |
multiply(Permutation p)
Multiply this vector with a permutation. |
java.lang.String |
toString()
|
| Methods inherited from class org.bouncycastle.pqc.math.linearalgebra.Vector |
|---|
getLength |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GF2mVector(GF2mField field,
byte[] v)
field - finite fieldv - array with elements of vector
public GF2mVector(GF2mField field,
int[] vector)
field - the finite field GF(2m)vector - the element arraypublic GF2mVector(GF2mVector other)
other - another GF2mVector| Method Detail |
|---|
public GF2mField getField()
public int[] getIntArrayForm()
public byte[] getEncoded()
getEncoded in class Vectorpublic boolean isZero()
Vector
isZero in class Vectorpublic Vector add(Vector addend)
add in class Vectoraddend - the other vector
java.lang.ArithmeticException - if the other vector is not defined over the same field as
this vector.
TODO: implement this methodpublic Vector multiply(Permutation p)
multiply in class Vectorp - the permutation
public boolean equals(java.lang.Object other)
equals in class Vectorother - the other object
public int hashCode()
hashCode in class Vectorpublic java.lang.String toString()
toString in class Vector
|
Bouncy Castle Cryptography 1.50 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||