Stay organized with collections
Save and categorize content based on your preferences.
ECFieldFp
public
class
ECFieldFp
extends Object
implements
ECField
This immutable class defines an elliptic curve (EC) prime
finite field.
Summary
Public constructors |
ECFieldFp(BigInteger p)
Creates an elliptic curve prime finite field
with the specified prime p .
|
Public methods |
boolean
|
equals(Object obj)
Compares this prime finite field for equality with the
specified object.
|
int
|
getFieldSize()
Returns the field size in bits which is size of prime p
for this prime finite field.
|
BigInteger
|
getP()
Returns the prime p of this prime finite field.
|
int
|
hashCode()
Returns a hash code value for this prime finite field.
|
Inherited methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long timeoutMillis, int nanos)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait(long timeoutMillis)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted.
|
|
|
Public constructors
ECFieldFp
public ECFieldFp (BigInteger p)
Creates an elliptic curve prime finite field
with the specified prime p
.
Parameters |
p |
BigInteger : the prime. |
Public methods
equals
public boolean equals (Object obj)
Compares this prime finite field for equality with the
specified object.
Parameters |
obj |
Object : the object to be compared. |
Returns |
boolean |
true if obj is an instance
of ECFieldFp and the prime value match, false otherwise. |
getFieldSize
public int getFieldSize ()
Returns the field size in bits which is size of prime p
for this prime finite field.
Returns |
int |
the field size in bits. |
getP
public BigInteger getP ()
Returns the prime p
of this prime finite field.
hashCode
public int hashCode ()
Returns a hash code value for this prime finite field.
Returns |
int |
a hash code value. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# ECFieldFp\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Ctors](#pubctors) \\| [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nECFieldFp\n=========\n\n\n`\npublic\n\n\nclass\nECFieldFp\n`\n\n\n`\n\nextends `[Object](/reference/java/lang/Object)`\n\n\n`\n\n`\n\n\nimplements\n\n`[ECField](/reference/java/security/spec/ECField)`\n\n\n`\n\n|---|------------------------------|\n| [java.lang.Object](/reference/java/lang/Object) ||\n| ↳ | java.security.spec.ECFieldFp |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nThis immutable class defines an elliptic curve (EC) prime\nfinite field. \n**See also:**\n\n- [ECField](/reference/java/security/spec/ECField)\n\nSummary\n-------\n\n| ### Public constructors ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[ECFieldFp](/reference/java/security/spec/ECFieldFp#ECFieldFp(java.math.BigInteger))`(`[BigInteger](/reference/java/math/BigInteger)` p) ` Creates an elliptic curve prime finite field with the specified prime `p`. |\n\n| ### Public methods ||\n|--------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` boolean` | ` `[equals](/reference/java/security/spec/ECFieldFp#equals(java.lang.Object))`(`[Object](/reference/java/lang/Object)` obj) ` Compares this prime finite field for equality with the specified object. |\n| ` int` | ` `[getFieldSize](/reference/java/security/spec/ECFieldFp#getFieldSize())`() ` Returns the field size in bits which is size of prime p for this prime finite field. |\n| ` `[BigInteger](/reference/java/math/BigInteger) | ` `[getP](/reference/java/security/spec/ECFieldFp#getP())`() ` Returns the prime `p` of this prime finite field. |\n| ` int` | ` `[hashCode](/reference/java/security/spec/ECFieldFp#hashCode())`() ` Returns a hash code value for this prime finite field. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` `[java.lang.Object](/reference/java/lang/Object)` ` |---------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](/reference/java/lang/Object) | ` `[clone](/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object. | | ` boolean` | ` `[equals](/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](/reference/java/lang/Object)` obj) ` Indicates whether some other object is \"equal to\" this one. | | ` void` | ` `[finalize](/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final `[Class](/reference/java/lang/Class)`\u003c?\u003e` | ` `[getClass](/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this `Object`. | | ` int` | ` `[hashCode](/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object. | | ` final void` | ` `[notify](/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` `[notifyAll](/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor. | | ` `[String](/reference/java/lang/String) | ` `[toString](/reference/java/lang/Object#toString())`() ` Returns a string representation of the object. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||\n| From interface ` `[java.security.spec.ECField](/reference/java/security/spec/ECField)` ` |-----------------|--------------------------------------------------------------------------------------------------------------| | ` abstract int` | ` `[getFieldSize](/reference/java/security/spec/ECField#getFieldSize())`() ` Returns the field size in bits. | ||\n\nPublic constructors\n-------------------\n\n### ECFieldFp\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic ECFieldFp (BigInteger p)\n```\n\nCreates an elliptic curve prime finite field\nwith the specified prime `p`.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-----|---------------------------------|\n| `p` | `BigInteger`: the prime. \u003cbr /\u003e |\n\n| Throws ||\n|---------------------------------------------------------------------------|-------------------------|\n| [NullPointerException](/reference/java/lang/NullPointerException) | if `p` is null. |\n| [IllegalArgumentException](/reference/java/lang/IllegalArgumentException) | if `p` is not positive. |\n\nPublic methods\n--------------\n\n### equals\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic boolean equals (Object obj)\n```\n\nCompares this prime finite field for equality with the\nspecified object.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------|---------------------------------------------|\n| `obj` | `Object`: the object to be compared. \u003cbr /\u003e |\n\n| Returns ||\n|-----------|----------------------------------------------------------------------------------------------|\n| `boolean` | true if `obj` is an instance of ECFieldFp and the prime value match, false otherwise. \u003cbr /\u003e |\n\n### getFieldSize\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic int getFieldSize ()\n```\n\nReturns the field size in bits which is size of prime p\nfor this prime finite field.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------|--------------------------------|\n| `int` | the field size in bits. \u003cbr /\u003e |\n\n### getP\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic BigInteger getP ()\n```\n\nReturns the prime `p` of this prime finite field.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-----------------------------------------------|-------------------|\n| [BigInteger](/reference/java/math/BigInteger) | the prime. \u003cbr /\u003e |\n\n### hashCode\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic int hashCode ()\n```\n\nReturns a hash code value for this prime finite field.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------|---------------------------|\n| `int` | a hash code value. \u003cbr /\u003e |"]]