Top Description Fields Constructors Methods
org.bouncycastle.bcpg

public Class RSAPublicBCPGKey

extends BCPGObject
implements BCPGKey
Class Inheritance
All Implemented Interfaces
org.bouncycastle.bcpg.BCPGKey, org.bouncycastle.util.Encodable
Imports
java.math.BigInteger, java.io.*

base class for an RSA Public Key.

Field Summary

Modifier and TypeField and Description
pack-priv MPInteger
e

pack-priv MPInteger
n

Constructor Summary

AccessConstructor and Description
public
RSAPublicBCPGKey(BCPGInputStream in)

Construct an RSA public key from the passed in stream.

public
RSAPublicBCPGKey(BigInteger
the modulus
n
,
BigInteger
the public exponent
e
)

Method Summary

Modifier and TypeMethod and Description
public void
public byte[]
public String
public BigInteger
public BigInteger

Field Detail

eback to summary
pack-priv MPInteger e
nback to summary
pack-priv MPInteger n

Constructor Detail

RSAPublicBCPGKeyback to summary
public RSAPublicBCPGKey(BCPGInputStream in) throws IOException

Construct an RSA public key from the passed in stream.

RSAPublicBCPGKeyback to summary
public RSAPublicBCPGKey(BigInteger n, BigInteger e)
Parameters
n:BigInteger

the modulus

e:BigInteger

the public exponent

Method Detail

encodeback to summary
public void encode(BCPGOutputStream out) throws IOException

Implements abstract org.bouncycastle.bcpg.BCPGObject.encode.

getEncodedback to summary
public byte[] getEncoded()

Overrides org.bouncycastle.bcpg.BCPGObject.getEncoded.

Implements org.bouncycastle.bcpg.BCPGKey.getEncoded, org.bouncycastle.util.Encodable.getEncoded.

return the standard PGP encoding of the key.

Returns:byte[]

Doc from org.bouncycastle.bcpg.BCPGKey.getEncoded.

byte[]

See Also
org.bouncycastle.bcpg.BCPGKey#getEncoded()
getFormatback to summary
public String getFormat()

Implements org.bouncycastle.bcpg.BCPGKey.getFormat.

return "PGP"

Returns:String

Doc from org.bouncycastle.bcpg.BCPGKey.getFormat.

"RAW" or "PGP"

See Also
org.bouncycastle.bcpg.BCPGKey#getFormat()
getModulusback to summary
public BigInteger getModulus()
getPublicExponentback to summary
public BigInteger getPublicExponent()