Class Certificate


  • public class Certificate
    extends Object
    Certificate, uses RSA, EcDSA, EdDSA.
    Version:
    September 13, 2021
    Author:
    Javier Rojas Blum, Sergey Manoylo
    • 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