Package io.jans.as.model.crypto
Class Certificate
- java.lang.Object
-
- io.jans.as.model.crypto.Certificate
-
public class Certificate extends Object
Certificate, uses RSA, EcDSA, EdDSA.- Version:
- September 13, 2021
- Author:
- Javier Rojas Blum, Sergey Manoylo
-
-
Constructor Summary
Constructors Constructor Description Certificate(SignatureAlgorithm signatureAlgorithm, X509Certificate x509Certificate)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ECDSAPublicKey
getEcdsaPublicKey()
Returns ECDSA Public Key from X509 Certificate.EDDSAPublicKey
getEddsaPublicKey()
Returns EDDSA Public Key from X509 Certificate.PublicKey
getPublicKey()
Returns Public Key from X509 Certificate.RSAPublicKey
getRsaPublicKey()
Returns RSA Public Key from X509 Certificate.org.json.JSONArray
toJSONArray()
String
toString()
-
-
-
Constructor Detail
-
Certificate
public Certificate(SignatureAlgorithm signatureAlgorithm, X509Certificate x509Certificate)
Constructor.- Parameters:
signatureAlgorithm
- Signature algorithm (RS256, RS384, RS512, ES256, ES256K, ES384, ES512, PS256, PS384, PS512, EDDSA/Ed25519).x509Certificate
- X509 certificate.
-
-
Method Detail
-
getPublicKey
public PublicKey getPublicKey()
Returns Public Key from X509 Certificate.- Returns:
- Public Key from X509 Certificate.
-
getRsaPublicKey
public RSAPublicKey getRsaPublicKey()
Returns RSA Public Key from X509 Certificate.- Returns:
- RSA Public Key from X509 Certificate.
-
getEcdsaPublicKey
public ECDSAPublicKey getEcdsaPublicKey()
Returns ECDSA Public Key from X509 Certificate.- Returns:
- ECDSA Public Key from X509 Certificate.
-
getEddsaPublicKey
public EDDSAPublicKey getEddsaPublicKey()
Returns EDDSA Public Key from X509 Certificate.- Returns:
- EDDSA Public Key from X509 Certificate.
-
toJSONArray
public org.json.JSONArray toJSONArray() throws org.json.JSONException
- Throws:
org.json.JSONException
-
-