Package java.security.spec
Class ECFieldFp
java.lang.Object
java.security.spec.ECFieldFp
- All Implemented Interfaces:
ECField
public class ECFieldFp extends Object implements ECField
The parameters specifying a prime finite field of an
elliptic curve.
-
Constructor Summary
Constructors Constructor Description ECFieldFp(BigInteger p)Creates a new prime finite field of an elliptic curve with the specified primep. -
Method Summary
Modifier and Type Method Description booleanequals(Object obj)Returns whether the specified object is equal to this finite field.intgetFieldSize()Returns the size of the finite field (in bits).BigIntegergetP()Returns the prime valuepfor this finite field.inthashCode()Returns the hashcode value for this finite field.
-
Constructor Details
-
ECFieldFp
Creates a new prime finite field of an elliptic curve with the specified primep.- Parameters:
p- the prime valuep.- Throws:
IllegalArgumentException- ifp <= zero.
-
-
Method Details
-
getFieldSize
public int getFieldSize()Returns the size of the finite field (in bits).- Specified by:
getFieldSizein interfaceECField- Returns:
- the size of the finite field (in bits).
-
getP
Returns the prime valuepfor this finite field.- Returns:
- the prime value
pfor this finite field.
-
equals
Returns whether the specified object is equal to this finite field.- Overrides:
equalsin classObject- Parameters:
obj- the object to compare to this finite field.- Returns:
trueif the specified object is equal to this finite field, otherwisefalse.- See Also:
Object.hashCode()
-
hashCode
public int hashCode()Returns the hashcode value for this finite field.- Overrides:
hashCodein classObject- Returns:
- the hashcode value for this finite field.
- See Also:
Object.equals(java.lang.Object)
-