Class PublicKeyData
java.lang.Object
com.mulesoft.connectors.mcp.api.certificate.PublicKeyData
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionPublicKeyData(String algorithm, byte[] encoded) Constructs a newPublicKeyDatainstance with the specified algorithm and encoded form.PublicKeyData(String publicKey, BigInteger modulus, BigInteger params, String algorithm, byte[] encoded) Constructs a newPublicKeyDatainstance with detailed attributes. -
Method Summary
Modifier and TypeMethodDescriptionReturns the algorithm of the public key.byte[]Returns the encoded form of the public key.Returns the modulus of the public key.Returns the parameters of the public key.toString()
-
Constructor Details
-
PublicKeyData
Constructs a newPublicKeyDatainstance with the specified algorithm and encoded form.- Parameters:
algorithm- the algorithm of the public keyencoded- the encoded form of the public key
-
PublicKeyData
public PublicKeyData(String publicKey, BigInteger modulus, BigInteger params, String algorithm, byte[] encoded) Constructs a newPublicKeyDatainstance with detailed attributes.- Parameters:
publicKey- the public key stringmodulus- the modulus of the public keyparams- the parameters of the public keyalgorithm- the algorithm of the public keyencoded- the encoded form of the public key
-
-
Method Details
-
getPublicKey
-
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
Returns the parameters of the public key.- Returns:
- the parameters of the public key
-
getModulus
Returns the modulus of the public key.- Returns:
- the modulus of the public key
-
toString
-