org.bouncycastle.bcpg

Class RSAPublicBCPGKey

Implemented Interfaces:
BCPGKey

public class RSAPublicBCPGKey
extends BCPGObject
implements BCPGKey

base class for an RSA Public Key.

Constructor Summary

RSAPublicBCPGKey(BigInteger n, BigInteger e)
RSAPublicBCPGKey(BCPGInputStream in)
Construct an RSA public key from the passed in stream.

Method Summary

void
encode(BCPGOutputStream out)
byte[]
getEncoded()
return the standard PGP encoding of the key.
String
getFormat()
return "PGP"
BigInteger
getModulus()
BigInteger
getPublicExponent()

Methods inherited from class org.bouncycastle.bcpg.BCPGObject

encode, getEncoded

Constructor Details

RSAPublicBCPGKey

public RSAPublicBCPGKey(BigInteger n,
                        BigInteger e)

Parameters:
n - the modulus
e - the public exponent


RSAPublicBCPGKey

public RSAPublicBCPGKey(BCPGInputStream in)
            throws IOException
Construct an RSA public key from the passed in stream.

Parameters:
in -

Method Details

encode

public void encode(BCPGOutputStream out)
            throws IOException
Overrides:
encode in interface BCPGObject


getEncoded

public byte[] getEncoded()
return the standard PGP encoding of the key.
Specified by:
getEncoded in interface BCPGKey
Overrides:
getEncoded in interface BCPGObject

See Also:
BCPGKey.getEncoded()


getFormat

public String getFormat()
return "PGP"
Specified by:
getFormat in interface BCPGKey

See Also:
BCPGKey.getFormat()


getModulus

public BigInteger getModulus()


getPublicExponent

public BigInteger getPublicExponent()