Named

sealed class Named : AsymmetricKey

Key identified by a key id which is somehow known to other parties.

Named keys must never be used in X509-certificate based workflows. Use Anonymous keys instead.

Inheritors

Properties

Link copied to clipboard
abstract val algorithm: Algorithm

Signature algorithm

Link copied to clipboard
Link copied to clipboard
abstract val keyId: String

Key identifier, corresponds to kid header value in JWT

Link copied to clipboard
Link copied to clipboard
abstract val publicKey: PublicKey

Public key that corresponds to the private key used for signing

Link copied to clipboard
Link copied to clipboard
open override val subject: String

Entity to which the key belongs; key id for named key, common name for the keys with the certificate chain.

Functions

Link copied to clipboard
open override fun close()

Closes the key, zeroing any underlying private key material if this is an explicit key.

Link copied to clipboard
abstract suspend fun keyAgreement(otherKey: EcPublicKey): SecureByteString
suspend fun keyAgreement(otherKey: PublicKey): SecureByteString

Performs Key Agreement using this key and otherKey.

Link copied to clipboard
abstract suspend fun sign(message: ByteArray): Signature

Signs message with this key.

Link copied to clipboard
suspend fun signEc(message: ByteArray): EcSignature

Convenience method to sign message when this is an EC key.

Link copied to clipboard
suspend fun signMlDsa(message: ByteArray): MlDsaSignature

Convenience method to sign message when this is an ML-DSA key.

Link copied to clipboard
suspend fun signRsa(message: ByteArray): RsaSignature

Convenience method to sign message when this is an RSA key.