Stay organized with collections
Save and categorize content based on your preferences.
ECPublicKeySpec
open class ECPublicKeySpec : KeySpec
This immutable class specifies an elliptic curve public key with its associated parameters.
Summary
Public constructors |
Creates a new ECPublicKeySpec with the specified parameter values.
|
Public methods |
open ECParameterSpec! |
Returns the associated elliptic curve domain parameters.
|
open ECPoint! |
Returns the public point W.
|
Public constructors
ECPublicKeySpec
ECPublicKeySpec(
w: ECPoint!,
params: ECParameterSpec!)
Creates a new ECPublicKeySpec with the specified parameter values.
Parameters |
w |
ECPoint!: the public point. |
params |
ECParameterSpec!: the associated elliptic curve domain parameters. |
Exceptions |
java.lang.NullPointerException |
if w or params is null. |
java.lang.IllegalArgumentException |
if w is point at infinity, i.e. ECPoint.POINT_INFINITY |
Public methods
getParams
open fun getParams(): ECParameterSpec!
Returns the associated elliptic curve domain parameters.
getW
open fun getW(): ECPoint!
Returns the public point W.
Return |
ECPoint! |
the public point W. |
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,["# ECPublicKeySpec\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nECPublicKeySpec\n===============\n\n```\nopen class ECPublicKeySpec : KeySpec\n```\n\n|---|-----------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [java.security.spec.ECPublicKeySpec](#) |\n\nThis immutable class specifies an elliptic curve public key with its associated parameters.\n\nSummary\n-------\n\n| Public constructors ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [ECPublicKeySpec](#ECPublicKeySpec(java.security.spec.ECPoint,%20java.security.spec.ECParameterSpec))`(`w:` `[ECPoint](/reference/kotlin/java/security/spec/ECPoint)!`, `params:` `[ECParameterSpec](/reference/kotlin/java/security/spec/ECParameterSpec)!`)` Creates a new ECPublicKeySpec with the specified parameter values. |\n\n| Public methods ||\n|-------------------------------------------------------------------------------|----------------------------------------------------------------------------------------|\n| open [ECParameterSpec](/reference/kotlin/java/security/spec/ECParameterSpec)! | [getParams](#getParams())`()` Returns the associated elliptic curve domain parameters. |\n| open [ECPoint](/reference/kotlin/java/security/spec/ECPoint)! | [getW](#getW())`()` Returns the public point W. |\n\nPublic constructors\n-------------------\n\n### ECPublicKeySpec\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nECPublicKeySpec(\n w: ECPoint!, \n params: ECParameterSpec!)\n```\n\nCreates a new ECPublicKeySpec with the specified parameter values.\n\n| Parameters ||\n|----------|----------------------------------------------------------------------------------------------------------------------------|\n| `w` | [ECPoint](/reference/kotlin/java/security/spec/ECPoint)!: the public point. |\n| `params` | [ECParameterSpec](/reference/kotlin/java/security/spec/ECParameterSpec)!: the associated elliptic curve domain parameters. |\n\n| Exceptions ||\n|--------------------------------------|----------------------------------------------------------|\n| `java.lang.NullPointerException` | if `w` or `params` is null. |\n| `java.lang.IllegalArgumentException` | if `w` is point at infinity, i.e. ECPoint.POINT_INFINITY |\n\nPublic methods\n--------------\n\n### getParams\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getParams(): ECParameterSpec!\n```\n\nReturns the associated elliptic curve domain parameters.\n\n| Return ||\n|--------------------------------------------------------------------------|---------------------------|\n| [ECParameterSpec](/reference/kotlin/java/security/spec/ECParameterSpec)! | the EC domain parameters. |\n\n### getW\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getW(): ECPoint!\n```\n\nReturns the public point W.\n\n| Return ||\n|----------------------------------------------------------|---------------------|\n| [ECPoint](/reference/kotlin/java/security/spec/ECPoint)! | the public point W. |"]]