Ed25519PrivateKey

Represents a private key for the Ed25519 algorithm.

This class extends the abstract class PrivateKey and implements the interfaces SignableKey, StorableKey, and ExportableKey.

Parameters

nativeValue

The raw byte array representing the private key.

Constructors

Link copied to clipboard
constructor(nativeValue: ByteArray)

Creates an instance of Ed25519PrivateKey and initializes its properties.

Properties

Link copied to clipboard

A mutable map representing the key specification.

Link copied to clipboard
open override val raw: ByteArray

The raw byte array representing the private key.

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

The size of the private key in bytes.

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

The type of the key. Always set to KeyTypes.EC.

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.

Link copied to clipboard
open override fun sign(message: ByteArray): ByteArray

Signs a byte array message using the private key.