Package org.bouncycastle.bcpg
Class RSAPublicBCPGKey
java.lang.Object
org.bouncycastle.bcpg.BCPGObject
org.bouncycastle.bcpg.RSAPublicBCPGKey
- All Implemented Interfaces:
BCPGKey
,org.bouncycastle.util.Encodable
base class for an RSA Public Key.
-
Constructor Summary
ConstructorDescriptionConstruct an RSA public key from the passed in stream. -
Method Summary
Modifier and TypeMethodDescriptionvoid
encode
(BCPGOutputStream out) byte[]
return the standard PGP encoding of the key.return "PGP"
-
Constructor Details
-
RSAPublicBCPGKey
Construct an RSA public key from the passed in stream.- Parameters:
in
-- Throws:
IOException
-
RSAPublicBCPGKey
- Parameters:
n
- the moduluse
- the public exponent
-
-
Method Details
-
getPublicExponent
-
getModulus
-
getFormat
return "PGP" -
getEncoded
public byte[] getEncoded()return the standard PGP encoding of the key.- Specified by:
getEncoded
in interfaceBCPGKey
- Specified by:
getEncoded
in interfaceorg.bouncycastle.util.Encodable
- Overrides:
getEncoded
in classBCPGObject
- Returns:
- byte[]
- See Also:
-
encode
- Specified by:
encode
in classBCPGObject
- Throws:
IOException
-