X25519PrivateKey

Represents a private key for the X25519 elliptic curve.

Parameters

nativeValue

The raw private key value in byte array format.

Constructors

Link copied to clipboard
constructor(nativeValue: ByteArray)

Properties

Link copied to clipboard
Link copied to clipboard
open override val raw: ByteArray
Link copied to clipboard
open override val restorationIdentifier: String

This variable represents the restoration identifier for a key. It is a unique identifier used for restoring the key from storage.

Link copied to clipboard
open override val size: Int
Link copied to clipboard
open override val storableData: ByteArray

Represents the storable data of a key.

Link copied to clipboard
open override val type: KeyTypes

Functions

Link copied to clipboard

Evaluates if this key implements VerifiableKey

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Checks if the current Key object is equal to the provided object. Two Key objects are considered equal if the following conditions are met:

Link copied to clipboard

Returns the value of the key curve for this private key

Link copied to clipboard

Returns an instance of the key curve for this private key

Link copied to clipboard

Returns the encoded raw value into base 64 url

Link copied to clipboard

Returns the index for this private key

Link copied to clipboard
open override fun getJwk(): JWK

Retrieves the JWK (JSON Web Key) representation of the private key.

Link copied to clipboard
open override fun getPem(): String

Returns the PEM (Privacy-Enhanced Mail) representation of the private key. The key is encoded in base64 and wrapped with "BEGIN" and "END" markers.

Link copied to clipboard

Searches the value based on the input key, if it exists

Link copied to clipboard

Returns the value of this private key

Link copied to clipboard
open override fun hashCode(): Int

Computes the hash code of the Key object. The hash code is calculated based on the properties of the keySpecification map and the raw byte array. Two Key objects with the same keySpecification map and the raw byte array are guaranteed to have the same hash code.

Link copied to clipboard
fun isCurve(curve: String): Boolean

Evaluates if the input curve matches the actual curve this key has

Link copied to clipboard

Evaluates if this key implements DerivableKey

Link copied to clipboard

Evaluates if this key implements ExportableKey

Link copied to clipboard

Evaluates if this key implements ImportableKey

Link copied to clipboard

Evaluates if this key implements SignableKey

Link copied to clipboard
open override fun jca(): <Error class: unknown class>
Link copied to clipboard
open override fun jwkWithKid(kid: String): JWK

Retrieves the JWK (JSON Web Key) representation of the private key with the specified key identifier (kid).

Link copied to clipboard
open override fun publicKey(): PublicKey

Returns the public key corresponding to this private key.