Stay organized with collections
Save and categorize content based on your preferences.
ECPoint
open class ECPoint
This immutable class represents a point on an elliptic curve (EC) in affine coordinates. Other coordinate systems can extend this class to represent this point in other coordinates.
Summary
Public constructors |
Creates an ECPoint from the specified affine x-coordinate x and affine y-coordinate y .
|
Public methods |
open Boolean |
Compares this elliptic curve point for equality with the specified object.
|
open BigInteger! |
Returns the affine x-coordinate x .
|
open BigInteger! |
Returns the affine y-coordinate y .
|
open Int |
Returns a hash code value for this elliptic curve point.
|
Properties |
static ECPoint! |
This defines the point at infinity.
|
Public constructors
ECPoint
ECPoint(
x: BigInteger!,
y: BigInteger!)
Creates an ECPoint from the specified affine x-coordinate x
and affine y-coordinate y
.
Exceptions |
java.lang.NullPointerException |
if x or y is null. |
Public methods
equals
open fun equals(other: Any?): Boolean
Compares this elliptic curve point for equality with the specified object.
Parameters |
obj |
the object to be compared. |
Return |
Boolean |
true if obj is an instance of ECPoint and the affine coordinates match, false otherwise. |
getAffineX
open fun getAffineX(): BigInteger!
Returns the affine x-coordinate x
. Note: POINT_INFINITY has a null affine x-coordinate.
getAffineY
open fun getAffineY(): BigInteger!
Returns the affine y-coordinate y
. Note: POINT_INFINITY has a null affine y-coordinate.
hashCode
open fun hashCode(): Int
Returns a hash code value for this elliptic curve point.
Return |
Int |
a hash code value. |
Properties
POINT_INFINITY
static val POINT_INFINITY: ECPoint!
This defines the point at infinity.
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,["# ECPoint\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nECPoint\n=======\n\n```\nopen class ECPoint\n```\n\n|---|---------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [java.security.spec.ECPoint](#) |\n\nThis immutable class represents a point on an elliptic curve (EC) in affine coordinates. Other coordinate systems can extend this class to represent this point in other coordinates.\n\nSummary\n-------\n\n| Public constructors ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [ECPoint](#ECPoint(java.math.BigInteger,%20java.math.BigInteger))`(`x:` `[BigInteger](../../math/BigInteger.html#)!`, `y:` `[BigInteger](../../math/BigInteger.html#)!`)` Creates an ECPoint from the specified affine x-coordinate `x` and affine y-coordinate `y`. |\n\n| Public methods ||\n|-----------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| open [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [equals](#equals(kotlin.Any))`(`other:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?`)` Compares this elliptic curve point for equality with the specified object. |\n| open [BigInteger](../../math/BigInteger.html#)! | [getAffineX](#getAffineX())`()` Returns the affine x-coordinate `x`. |\n| open [BigInteger](../../math/BigInteger.html#)! | [getAffineY](#getAffineY())`()` Returns the affine y-coordinate `y`. |\n| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [hashCode](#hashCode())`()` Returns a hash code value for this elliptic curve point. |\n\n| Properties ||\n|----------------------|--------------------------------------------------------------------------------------------------|\n| static [ECPoint](#)! | [POINT_INFINITY](#POINT_INFINITY:java.security.spec.ECPoint) This defines the point at infinity. |\n\nPublic constructors\n-------------------\n\n### ECPoint\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nECPoint(\n x: BigInteger!, \n y: BigInteger!)\n```\n\nCreates an ECPoint from the specified affine x-coordinate `x` and affine y-coordinate `y`.\n\n| Parameters ||\n|-----|----------------------------------------------------------------------|\n| `x` | [BigInteger](../../math/BigInteger.html#)!: the affine x-coordinate. |\n| `y` | [BigInteger](../../math/BigInteger.html#)!: the affine y-coordinate. |\n\n| Exceptions ||\n|----------------------------------|------------------------|\n| `java.lang.NullPointerException` | if `x` or `y` is null. |\n\nPublic methods\n--------------\n\n### equals\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun equals(other: Any?): Boolean\n```\n\nCompares this elliptic curve point for equality with the specified object.\n\n| Parameters ||\n|-------|----------------------------|\n| `obj` | the object to be compared. |\n\n| Return ||\n|------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | true if `obj` is an instance of ECPoint and the affine coordinates match, false otherwise. |\n\n### getAffineX\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getAffineX(): BigInteger!\n```\n\nReturns the affine x-coordinate `x`. Note: POINT_INFINITY has a null affine x-coordinate.\n\n| Return ||\n|--------------------------------------------|--------------------------|\n| [BigInteger](../../math/BigInteger.html#)! | the affine x-coordinate. |\n\n### getAffineY\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getAffineY(): BigInteger!\n```\n\nReturns the affine y-coordinate `y`. Note: POINT_INFINITY has a null affine y-coordinate.\n\n| Return ||\n|--------------------------------------------|--------------------------|\n| [BigInteger](../../math/BigInteger.html#)! | the affine y-coordinate. |\n\n### hashCode\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun hashCode(): Int\n```\n\nReturns a hash code value for this elliptic curve point.\n\n| Return ||\n|----------------------------------------------------------------------------|--------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | a hash code value. |\n\nProperties\n----------\n\n### POINT_INFINITY\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val POINT_INFINITY: ECPoint!\n```\n\nThis defines the point at infinity."]]