X509CertifiedExplicit
data class X509CertifiedExplicit(val certChain: X509CertChain, val privateKey: PrivateKey, val algorithm: Algorithm = when (privateKey) {
is EcPrivateKey -> privateKey.curve.defaultSigningAlgorithmFullySpecified
is RsaPrivateKey -> Algorithm.RS256
is MlDsaPrivateKey -> privateKey.algorithm
is MlKemPrivateKey -> privateKey.algorithm
}) : AsymmetricKey.X509Certified, AsymmetricKey.Explicit
AsymmetricKey which is both AsymmetricKey.X509Certified and AsymmetricKey.Explicit.
Constructors
Link copied to clipboard
constructor(certChain: X509CertChain, privateKey: PrivateKey, algorithm: Algorithm = when (privateKey) {
is EcPrivateKey -> privateKey.curve.defaultSigningAlgorithmFullySpecified
is RsaPrivateKey -> Algorithm.RS256
is MlDsaPrivateKey -> privateKey.algorithm
is MlKemPrivateKey -> privateKey.algorithm
})
Properties
Link copied to clipboard
X509 certificate chain for the key, corresponds to x5c header value in JWT.
Link copied to clipboard
Private key as EcPrivateKey
Link copied to clipboard
Public key as EcPublicKey
Link copied to clipboard
Private key as MlDsaPrivateKey
Link copied to clipboard
Public key as MlDsaPublicKey
Link copied to clipboard
Private key that is used for signing.
Link copied to clipboard
Private key as RsaPrivateKey
Link copied to clipboard
Public key as RsaPublicKey
Functions
Link copied to clipboard
Returns key's certificate subject as X500Name.
Link copied to clipboard
Performs Key Agreement using this key and otherKey.
Link copied to clipboard
Convenience method to sign message when this is an EC key.
Link copied to clipboard
Convenience method to sign message when this is an ML-DSA key.
Link copied to clipboard
Convenience method to sign message when this is an RSA key.