NamedExplicit

data class NamedExplicit(val keyId: String, val privateKey: EcPrivateKey, val algorithm: Algorithm = privateKey.curve.defaultSigningAlgorithmFullySpecified) : AsymmetricKey.Named, AsymmetricKey.Explicit

AsymmetricKey which is both AsymmetricKey.Named and AsymmetricKey.Explicit.

Constructors

Link copied to clipboard
constructor(keyId: String, privateKey: EcPrivateKey, algorithm: Algorithm = privateKey.curve.defaultSigningAlgorithmFullySpecified)

Properties

Link copied to clipboard
open override val algorithm: Algorithm

Signature algorithm

Link copied to clipboard
open override val keyId: String

Key identifier, corresponds to kid header value in JWT

Link copied to clipboard
open override val privateKey: EcPrivateKey

Private key that is used for signing.

Link copied to clipboard
open override val publicKey: EcPublicKey

Public key that corresponds to the private key used for signing

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 suspend override fun keyAgreement(otherKey: EcPublicKey): ByteArray

Performs Key Agreement using this key and otherKey.

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

Signs message with this key.