Ed25519PublicKey

Represents an Ed25519 public key.

This class implements the PublicKey, VerifiableKey, StorableKey, and ExportableKey interfaces.

Parameters

nativeValue

The native value of the public key.

Constructors

Link copied to clipboard
constructor(nativeValue: ByteArray)

Properties

Link copied to clipboard

The specification of the key.

Link copied to clipboard
open override val raw: ByteArray

The raw bytes of the 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 key.

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, which is 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
open override fun getJwk(): JWK

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

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

Returns the PEM (Privacy-Enhanced Mail) representation of the public 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 verify(message: ByteArray, signature: ByteArray): Boolean

Verifies the authenticity of a signature using a given message and signature.