Package software.amazon.awssdk.crt.cal
Class EccKeyPair
- java.lang.Object
-
- software.amazon.awssdk.crt.CrtResource
-
- software.amazon.awssdk.crt.cal.EccKeyPair
-
- All Implemented Interfaces:
AutoCloseable
public final class EccKeyPair extends CrtResource
This class puts an opaque wrapper around aws_ecc_key_pair from aws-c-cal. Currently, it is only intended to be cached and returned to native code by a signing invocation. If there's a compelling reason, we can add accessors and conversions to/from Java's KeyPair.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEccKeyPair.AwsEccCurve-
Nested classes/interfaces inherited from class software.amazon.awssdk.crt.CrtResource
CrtResource.ResourceInstance
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanReleaseReferencesImmediately()Determines whether a resource releases its dependencies at the same time the native handle is released or if it waits.static EccKeyPairnewDeriveFromCredentials(Credentials credentials, EccKeyPair.AwsEccCurve curve)protected voidreleaseNativeHandle()Releases the instance's reference to the underlying native key pairbyte[]signMessage(byte[] message)-
Methods inherited from class software.amazon.awssdk.crt.CrtResource
acquireNativeHandle, addRef, addReferenceTo, close, collectNativeResource, collectNativeResources, decRef, getNativeHandle, getResourceLogDescription, isNull, logNativeResources, releaseReferences, removeReferenceTo, setDescription, swapReferenceTo, waitForNoResources
-
-
-
-
Method Detail
-
canReleaseReferencesImmediately
protected boolean canReleaseReferencesImmediately()
Determines whether a resource releases its dependencies at the same time the native handle is released or if it waits. Resources that wait are responsible for calling releaseReferences() manually.- Specified by:
canReleaseReferencesImmediatelyin classCrtResource- Returns:
- true if this resource releases synchronously, false if this resource performs async shutdown
-
releaseNativeHandle
protected void releaseNativeHandle()
Releases the instance's reference to the underlying native key pair- Specified by:
releaseNativeHandlein classCrtResource
-
newDeriveFromCredentials
public static EccKeyPair newDeriveFromCredentials(Credentials credentials, EccKeyPair.AwsEccCurve curve)
-
signMessage
public byte[] signMessage(byte[] message)
-
-