Package com.nimbusds.jose.jwk
Interface AsymmetricJWK
- All Known Implementing Classes:
ECKey,OctetKeyPair,RSAKey
public interface AsymmetricJWK
Asymmetric (pair) JSON Web Key (JWK).
- Version:
- 2018-02-27
- Author:
- Vladimir Dzhuvinov
-
Method Summary
Modifier and TypeMethodDescriptionbooleanmatches(X509Certificate cert) Returnstrueif the public key material of this JWK matches the public subject key info of the specified X.509 certificate.Returns a Java key pair representation of this JWK.Returns a Java private key representation of this JWK.Returns a Java public key representation of the JWK.
-
Method Details
-
toPublicKey
Returns a Java public key representation of the JWK.- Returns:
- The Java public key.
- Throws:
JOSEException- If conversion failed or is not supported.
-
toPrivateKey
Returns a Java private key representation of this JWK.- Returns:
- The Java private key,
nullif not specified. - Throws:
JOSEException- If conversion failed or is not supported.
-
toKeyPair
Returns a Java key pair representation of this JWK.- Returns:
- The Java key pair. The private key will be
nullif not specified. - Throws:
JOSEException- If conversion failed or is not supported.
-
matches
Returnstrueif the public key material of this JWK matches the public subject key info of the specified X.509 certificate.- Parameters:
cert- The X.509 certificate. Must not benull.- Returns:
trueif the public key material of this JWK matches the public subject key info of the specified X.509 certificate, elsefalse.
-