src/share/classes/java/security/spec/ECFieldF2m.java
Print this page
@@ -43,13 +43,13 @@
private int[] ks;
private BigInteger rp;
/**
* Creates an elliptic curve characteristic 2 finite
- * field which has 2^<code>m</code> elements with normal basis.
- * @param m with 2^<code>m</code> being the number of elements.
- * @exception IllegalArgumentException if <code>m</code>
+ * field which has 2^{@code m} elements with normal basis.
+ * @param m with 2^{@code m} being the number of elements.
+ * @exception IllegalArgumentException if {@code m}
* is not positive.
*/
public ECFieldF2m(int m) {
if (m <= 0) {
throw new IllegalArgumentException("m is not positive");
@@ -59,28 +59,28 @@
this.rp = null;
}
/**
* Creates an elliptic curve characteristic 2 finite
- * field which has 2^<code>m</code> elements with
+ * field which has 2^{@code m} elements with
* polynomial basis.
* The reduction polynomial for this field is based
- * on <code>rp</code> whose i-th bit correspondes to
+ * on {@code rp} whose i-th bit correspondes to
* the i-th coefficient of the reduction polynomial.<p>
* Note: A valid reduction polynomial is either a
- * trinomial (X^<code>m</code> + X^<code>k</code> + 1
- * with <code>m</code> > <code>k</code> >= 1) or a
- * pentanomial (X^<code>m</code> + X^<code>k3</code>
- * + X^<code>k2</code> + X^<code>k1</code> + 1 with
- * <code>m</code> > <code>k3</code> > <code>k2</code>
- * > <code>k1</code> >= 1).
- * @param m with 2^<code>m</code> being the number of elements.
+ * trinomial (X^{@code m} + X^{@code k} + 1
+ * with {@code m} > {@code k} >= 1) or a
+ * pentanomial (X^{@code m} + X^{@code k3}
+ * + X^{@code k2} + X^{@code k1} + 1 with
+ * {@code m} > {@code k3} > {@code k2}
+ * > {@code k1} >= 1).
+ * @param m with 2^{@code m} being the number of elements.
* @param rp the BigInteger whose i-th bit corresponds to
* the i-th coefficient of the reduction polynomial.
- * @exception NullPointerException if <code>rp</code> is null.
- * @exception IllegalArgumentException if <code>m</code>
- * is not positive, or <code>rp</code> does not represent
+ * @exception NullPointerException if {@code rp} is null.
+ * @exception IllegalArgumentException if {@code m}
+ * is not positive, or {@code rp} does not represent
* a valid reduction polynomial.
*/
public ECFieldF2m(int m, BigInteger rp) {
// check m and rp
this.m = m;
@@ -104,32 +104,32 @@
}
}
/**
* Creates an elliptic curve characteristic 2 finite
- * field which has 2^<code>m</code> elements with
+ * field which has 2^{@code m} elements with
* polynomial basis. The reduction polynomial for this
- * field is based on <code>ks</code> whose content
+ * field is based on {@code ks} whose content
* contains the order of the middle term(s) of the
* reduction polynomial.
* Note: A valid reduction polynomial is either a
- * trinomial (X^<code>m</code> + X^<code>k</code> + 1
- * with <code>m</code> > <code>k</code> >= 1) or a
- * pentanomial (X^<code>m</code> + X^<code>k3</code>
- * + X^<code>k2</code> + X^<code>k1</code> + 1 with
- * <code>m</code> > <code>k3</code> > <code>k2</code>
- * > <code>k1</code> >= 1), so <code>ks</code> should
+ * trinomial (X^{@code m} + X^{@code k} + 1
+ * with {@code m} > {@code k} >= 1) or a
+ * pentanomial (X^{@code m} + X^{@code k3}
+ * + X^{@code k2} + X^{@code k1} + 1 with
+ * {@code m} > {@code k3} > {@code k2}
+ * > {@code k1} >= 1), so {@code ks} should
* have length 1 or 3.
- * @param m with 2^<code>m</code> being the number of elements.
+ * @param m with 2^{@code m} being the number of elements.
* @param ks the order of the middle term(s) of the
* reduction polynomial. Contents of this array are copied
* to protect against subsequent modification.
- * @exception NullPointerException if <code>ks</code> is null.
- * @exception IllegalArgumentException if<code>m</code>
- * is not positive, or the length of <code>ks</code>
- * is neither 1 nor 3, or values in <code>ks</code>
- * are not between <code>m</code>-1 and 1 (inclusive)
+ * @exception NullPointerException if {@code ks} is null.
+ * @exception IllegalArgumentException if{@code m}
+ * is not positive, or the length of {@code ks}
+ * is neither 1 nor 3, or values in {@code ks}
+ * are not between {@code m}-1 and 1 (inclusive)
* and in descending order.
*/
public ECFieldF2m(int m, int[] ks) {
// check m and ks
this.m = m;
@@ -158,22 +158,22 @@
rp = rp.setBit(this.ks[j]);
}
}
/**
- * Returns the field size in bits which is <code>m</code>
+ * Returns the field size in bits which is {@code m}
* for this characteristic 2 finite field.
* @return the field size in bits.
*/
public int getFieldSize() {
return m;
}
/**
- * Returns the value <code>m</code> of this characteristic
+ * Returns the value {@code m} of this characteristic
* 2 finite field.
- * @return <code>m</code> with 2^<code>m</code> being the
+ * @return {@code m} with 2^{@code m} being the
* number of elements.
*/
public int getM() {
return m;
}
@@ -209,12 +209,12 @@
/**
* Compares this finite field for equality with the
* specified object.
* @param obj the object to be compared.
- * @return true if <code>obj</code> is an instance
- * of ECFieldF2m and both <code>m</code> and the reduction
+ * @return true if {@code obj} is an instance
+ * of ECFieldF2m and both {@code m} and the reduction
* polynomial match, false otherwise.
*/
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj instanceof ECFieldF2m) {