org.bouncycastle.bcpg

Class RSAPublicBCPGKey

public class RSAPublicBCPGKey extends BCPGObject implements BCPGKey

base class for an RSA Public Key.
Constructor Summary
RSAPublicBCPGKey(BCPGInputStream in)
Construct an RSA public key from the passed in stream.
RSAPublicBCPGKey(BigInteger n, BigInteger e)
Method Summary
voidencode(BCPGOutputStream out)
byte[]getEncoded()
return the standard PGP encoding of the key.
StringgetFormat()
return "PGP"
BigIntegergetModulus()
BigIntegergetPublicExponent()

Constructor Detail

RSAPublicBCPGKey

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

Parameters: in

Throws: IOException

RSAPublicBCPGKey

public RSAPublicBCPGKey(BigInteger n, BigInteger e)

Parameters: n the modulus e the public exponent

Method Detail

encode

public void encode(BCPGOutputStream out)

getEncoded

public byte[] getEncoded()
return the standard PGP encoding of the key.

See Also: getEncoded

getFormat

public String getFormat()
return "PGP"

See Also: getFormat

getModulus

public BigInteger getModulus()

getPublicExponent

public BigInteger getPublicExponent()