Class PublicKeyData

java.lang.Object
com.mulesoft.connectors.mcp.api.certificate.PublicKeyData
All Implemented Interfaces:
Serializable

public class PublicKeyData extends Object implements Serializable
A custom Data Transfer Object (DTO) to replace the PublicKey class.

This class provides a representation of a public key with various attributes such as algorithm, encoded form, parameters, modulus, and the public key string. It implements Serializable to allow its instances to be serialized.

See Also:
  • Constructor Details

    • PublicKeyData

      public PublicKeyData(String algorithm, byte[] encoded)
      Constructs a new PublicKeyData instance with the specified algorithm and encoded form.
      Parameters:
      algorithm - the algorithm of the public key
      encoded - the encoded form of the public key
    • PublicKeyData

      public PublicKeyData(String publicKey, BigInteger modulus, BigInteger params, String algorithm, byte[] encoded)
      Constructs a new PublicKeyData instance with detailed attributes.
      Parameters:
      publicKey - the public key string
      modulus - the modulus of the public key
      params - the parameters of the public key
      algorithm - the algorithm of the public key
      encoded - the encoded form of the public key
  • Method Details

    • getPublicKey

      public String getPublicKey()
    • getAlgorithm

      public String getAlgorithm()
      Returns the algorithm of the public key.
      Returns:
      the algorithm of the public key
    • getEncoded

      public byte[] getEncoded()
      Returns the encoded form of the public key.
      Returns:
      the encoded form of the public key
    • getParams

      public BigInteger getParams()
      Returns the parameters of the public key.
      Returns:
      the parameters of the public key
    • getModulus

      public BigInteger getModulus()
      Returns the modulus of the public key.
      Returns:
      the modulus of the public key
    • toString

      public String toString()
      Overrides:
      toString in class Object