Class RSAPublicBCPGKey

  • All Implemented Interfaces:
    BCPGKey, org.bouncycastle.util.Encodable

    public class RSAPublicBCPGKey
    extends BCPGObject
    implements BCPGKey
    base class for an RSA Public Key.
    • Constructor Detail

      • RSAPublicBCPGKey

        public RSAPublicBCPGKey​(BCPGInputStream in)
                         throws java.io.IOException
        Construct an RSA public key from the passed in stream.
        Parameters:
        in -
        Throws:
        java.io.IOException
      • RSAPublicBCPGKey

        public RSAPublicBCPGKey​(java.math.BigInteger n,
                                java.math.BigInteger e)
        Parameters:
        n - the modulus
        e - the public exponent
    • Method Detail

      • getPublicExponent

        public java.math.BigInteger getPublicExponent()
      • getModulus

        public java.math.BigInteger getModulus()
      • getEncoded

        public byte[] getEncoded()
        return the standard PGP encoding of the key.
        Specified by:
        getEncoded in interface BCPGKey
        Specified by:
        getEncoded in interface org.bouncycastle.util.Encodable
        Overrides:
        getEncoded in class BCPGObject
        Returns:
        byte[]
        See Also:
        BCPGKey.getEncoded()