Class RSAPublicKeySpec

  • All Implemented Interfaces:
    KeySpec

    public class RSAPublicKeySpec
    extends Object
    implements KeySpec
    The key specification of a RSA public key.

    Defined in the PKCS #1 v2.1 standard.

    • Constructor Detail

      • RSAPublicKeySpec

        public RSAPublicKeySpec​(BigInteger modulus,
                                BigInteger publicExponent)
        Creates a new RSAPublicKeySpec with the specified modulus and public exponent.
        Parameters:
        modulus - the modulus n.
        publicExponent - the public exponent d.
    • Method Detail

      • getModulus

        public BigInteger getModulus()
        Returns the modulus n.
        Returns:
        the modulus n.
      • getPublicExponent

        public BigInteger getPublicExponent()
        Returns the public exponent d.
        Returns:
        the public exponent d.