Package com.unboundid.util.ssl.cert
Class RSAPublicKey
- java.lang.Object
-
- com.unboundid.util.ssl.cert.DecodedPublicKey
-
- com.unboundid.util.ssl.cert.RSAPublicKey
-
- All Implemented Interfaces:
java.io.Serializable
@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class RSAPublicKey extends DecodedPublicKey
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:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.math.BigInteger
getModulus()
Retrieves the modulus (n) for the RSA public key.java.math.BigInteger
getPublicExponent()
Retrieves the public exponent (e) for the RSA public key.void
toString(java.lang.StringBuilder buffer)
Appends a string representation of this decoded public key to the provided buffer.-
Methods inherited from class com.unboundid.util.ssl.cert.DecodedPublicKey
toString
-
-
-
-
Method Detail
-
getModulus
@NotNull public java.math.BigInteger getModulus()
Retrieves the modulus (n) for the RSA public key.- Returns:
- The modulus for the RSA public key.
-
getPublicExponent
@NotNull public java.math.BigInteger 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 java.lang.StringBuilder buffer)
Appends a string representation of this decoded public key to the provided buffer.- Specified by:
toString
in classDecodedPublicKey
- Parameters:
buffer
- The buffer to which the information should be appended.
-
-