java.security.spec
Class ECFieldFp

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.security.spec.ECFieldFp
All Implemented Interfaces:
ECField sample code for java.security.spec.ECField definition code for java.security.spec.ECField

public class ECFieldFp
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements ECField sample code for java.security.spec.ECField definition code for java.security.spec.ECField

This immutable class defines an elliptic curve (EC) prime finite field.

Since:
1.5
See Also:
ECField sample code for java.security.spec.ECField definition code for java.security.spec.ECField

Constructor Summary
ECFieldFp sample code for java.security.spec.ECFieldFp.ECFieldFp(java.math.BigInteger) definition code for java.security.spec.ECFieldFp.ECFieldFp(java.math.BigInteger) (BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  p)
          Creates an elliptic curve prime finite field with the specified prime p.
 
Method Summary
 boolean equals sample code for java.security.spec.ECFieldFp.equals(java.lang.Object) definition code for java.security.spec.ECFieldFp.equals(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  obj)
          Compares this prime finite field for equality with the specified object.
 int getFieldSize sample code for java.security.spec.ECFieldFp.getFieldSize() definition code for java.security.spec.ECFieldFp.getFieldSize() ()
          Returns the field size in bits which is size of prime p for this prime finite field.
 BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger getP sample code for java.security.spec.ECFieldFp.getP() definition code for java.security.spec.ECFieldFp.getP() ()
          Returns the prime p of this prime finite field.
 int hashCode sample code for java.security.spec.ECFieldFp.hashCode() definition code for java.security.spec.ECFieldFp.hashCode() ()
          Returns a hash code value for this prime finite field.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

ECFieldFp sample code for java.security.spec.ECFieldFp(java.math.BigInteger) definition code for java.security.spec.ECFieldFp(java.math.BigInteger)

public ECFieldFp(BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  p)
Creates an elliptic curve prime finite field with the specified prime p.

Parameters:
p - the prime.
Throws:
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - if p is null.
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if p is not positive.
Method Detail

getFieldSize sample code for java.security.spec.ECFieldFp.getFieldSize() definition code for java.security.spec.ECFieldFp.getFieldSize()

public int getFieldSize()
Returns the field size in bits which is size of prime p for this prime finite field.

Specified by:
getFieldSize sample code for java.security.spec.ECField.getFieldSize() definition code for java.security.spec.ECField.getFieldSize() in interface ECField sample code for java.security.spec.ECField definition code for java.security.spec.ECField
Returns:
the field size in bits.

getP sample code for java.security.spec.ECFieldFp.getP() definition code for java.security.spec.ECFieldFp.getP()

public BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  getP()
Returns the prime p of this prime finite field.

Returns:
the prime.

equals sample code for java.security.spec.ECFieldFp.equals(java.lang.Object) definition code for java.security.spec.ECFieldFp.equals(java.lang.Object)

public boolean equals(Object sample code for java.lang.Object definition code for java.lang.Object  obj)
Compares this prime finite field for equality with the specified object.

Overrides:
equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) in class Object sample code for java.lang.Object definition code for java.lang.Object
Parameters:
obj - the object to be compared.
Returns:
true if obj is an instance of ECFieldFp and the prime value match, false otherwise.
See Also:
Object.hashCode() sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable

hashCode sample code for java.security.spec.ECFieldFp.hashCode() definition code for java.security.spec.ECFieldFp.hashCode()

public int hashCode()
Returns a hash code value for this prime finite field.

Overrides:
hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() in class Object sample code for java.lang.Object definition code for java.lang.Object
Returns:
a hash code value.
See Also:
Object.equals(java.lang.Object) sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable