Top Description Fields Constructors Methods
org.bouncycastle.openpgp

public Class PGPPrivateKey

extends Object
Class Inheritance
Known Direct Subclasses
org.bouncycastle.openpgp.operator.jcajce.JcaPGPPrivateKey
Imports
org.bouncycastle.bcpg.BCPGKey, .PublicKeyPacket

general class to contain a private key for use with other openPGP objects.

Field Summary

Modifier and TypeField and Description
private long
private BCPGKey
private PublicKeyPacket

Constructor Summary

AccessConstructor and Description
public
PGPPrivateKey(long
keyID associated with the public key.
keyID
,
PublicKeyPacket
the public key data packet to be associated with this private key.
publicKeyPacket
,
BCPGKey
the private key data packet to be associate with this private key.
privateKeyDataPacket
)

Base constructor.

Method Summary

Modifier and TypeMethod and Description
public long

Returns:

long
getKeyID
()

Return the keyID associated with the contained private key.

public BCPGKey

Returns:

associated private key packet, null otherwise.
getPrivateKeyDataPacket
()

Return the private key packet associated with this private key, if available.

public PublicKeyPacket

Returns:

associated public key packet, null otherwise.
getPublicKeyPacket
()

Return the public key packet associated with this private key, if available.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

keyIDback to summary
private long keyID
privateKeyDataPacketback to summary
private BCPGKey privateKeyDataPacket
publicKeyPacketback to summary
private PublicKeyPacket publicKeyPacket

Constructor Detail

PGPPrivateKeyback to summary
public PGPPrivateKey(long keyID, PublicKeyPacket publicKeyPacket, BCPGKey privateKeyDataPacket)

Base constructor. Create a PGPPrivateKey from a keyID and the associated public/private data packets needed to fully describe it.

Parameters
keyID:long

keyID associated with the public key.

publicKeyPacket:PublicKeyPacket

the public key data packet to be associated with this private key.

privateKeyDataPacket:BCPGKey

the private key data packet to be associate with this private key.

Method Detail

getKeyIDback to summary
public long getKeyID()

Return the keyID associated with the contained private key.

Returns:long

long

getPrivateKeyDataPacketback to summary
public BCPGKey getPrivateKeyDataPacket()

Return the private key packet associated with this private key, if available.

Returns:BCPGKey

associated private key packet, null otherwise.

getPublicKeyPacketback to summary
public PublicKeyPacket getPublicKeyPacket()

Return the public key packet associated with this private key, if available.

Returns:PublicKeyPacket

associated public key packet, null otherwise.