X509CertifiedSecureAreaBased

data class X509CertifiedSecureAreaBased(val certChain: X509CertChain, val alias: String, val secureArea: SecureArea, val keyInfo: KeyInfo, val unlockReason: UnlockReason = UnlockReason.Unspecified, val algorithm: Algorithm = keyInfo.algorithm) : AsymmetricKey.X509Certified, AsymmetricKey.SecureAreaBased

AsymmetricKey which is both AsymmetricKey.X509Certified and AsymmetricKey.SecureAreaBased.

Constructors

Link copied to clipboard
constructor(certChain: X509CertChain, alias: String, secureArea: SecureArea, keyInfo: KeyInfo, unlockReason: UnlockReason = UnlockReason.Unspecified, algorithm: Algorithm = keyInfo.algorithm)

Properties

Link copied to clipboard
open override val algorithm: Algorithm

Signature algorithm

Link copied to clipboard
open override val alias: String

Alias of the private key that is used for signing

Link copied to clipboard
open override val certChain: X509CertChain

X509 certificate chain for the key, corresponds to x5c header value in JWT.

Link copied to clipboard
open override val keyInfo: KeyInfo

Key data

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 secureArea: SecureArea

SecureArea that holds the private key

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.

Link copied to clipboard
open override val unlockReason: UnlockReason

UnlockReason that should be used to generate a signature

Functions

Link copied to clipboard

Returns key's certificate subject as X500Name.

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.