Class RSAPublicKey

java.lang.Object
com.unboundid.util.ssl.cert.DecodedPublicKey
com.unboundid.util.ssl.cert.RSAPublicKey
All Implemented Interfaces:
Serializable

This class provides a data structure for representing the information contained in an RSA public key in an X.509 certificate. As per RFC 8017 section A.1.1, an RSA public key is identified by OID 1.2.840.113549.1.1.1 and the value is encoded as follows:
   RSAPublicKey ::= SEQUENCE {
      modulus            INTEGER,    -- n
      publicExponent     INTEGER  }  -- e
 
See Also:
  • Method Details

    • getModulus

      Retrieves the modulus (n) for the RSA public key.
      Returns:
      The modulus for the RSA public key.
    • getPublicExponent

      Retrieves the public exponent (e) for the RSA public key.
      Returns:
      The public exponent for the RSA public key.
    • toString

      public void toString(@NotNull StringBuilder buffer)
      Appends a string representation of this decoded public key to the provided buffer.
      Specified by:
      toString in class DecodedPublicKey
      Parameters:
      buffer - The buffer to which the information should be appended.