|
Bouncy Castle Cryptography Library 1.45 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.bouncycastle.openpgp.PGPKeyPair
public class PGPKeyPair
General class to handle JCA key pairs and convert them into OpenPGP ones.
A word for the unwary, the KeyID for a OpenPGP public key is calculated from a hash that includes the time of creation, if you pass a different date to the constructor below with the same public private key pair the KeyID will not be the same as for previous generations of the key, so ideally you only want to do this once.
Constructor Summary | |
---|---|
PGPKeyPair(int algorithm,
java.security.KeyPair keyPair,
java.util.Date time)
|
|
PGPKeyPair(int algorithm,
java.security.KeyPair keyPair,
java.util.Date time,
java.lang.String provider)
Deprecated. use version without provider. |
|
PGPKeyPair(int algorithm,
java.security.PublicKey pubKey,
java.security.PrivateKey privKey,
java.util.Date time)
|
|
PGPKeyPair(int algorithm,
java.security.PublicKey pubKey,
java.security.PrivateKey privKey,
java.util.Date time,
java.lang.String provider)
Deprecated. use version without provider. |
|
PGPKeyPair(PGPPublicKey pub,
PGPPrivateKey priv)
Create a key pair from a PGPPrivateKey and a PGPPublicKey. |
Method Summary | |
---|---|
long |
getKeyID()
Return the keyID associated with this key pair. |
PGPPrivateKey |
getPrivateKey()
|
PGPPublicKey |
getPublicKey()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PGPKeyPair(int algorithm, java.security.KeyPair keyPair, java.util.Date time, java.lang.String provider) throws PGPException, java.security.NoSuchProviderException
PGPException
java.security.NoSuchProviderException
public PGPKeyPair(int algorithm, java.security.KeyPair keyPair, java.util.Date time) throws PGPException
PGPException
public PGPKeyPair(int algorithm, java.security.PublicKey pubKey, java.security.PrivateKey privKey, java.util.Date time, java.lang.String provider) throws PGPException, java.security.NoSuchProviderException
PGPException
java.security.NoSuchProviderException
public PGPKeyPair(int algorithm, java.security.PublicKey pubKey, java.security.PrivateKey privKey, java.util.Date time) throws PGPException
PGPException
public PGPKeyPair(PGPPublicKey pub, PGPPrivateKey priv)
pub
- the public keypriv
- the private keyMethod Detail |
---|
public long getKeyID()
public PGPPublicKey getPublicKey()
public PGPPrivateKey getPrivateKey()
|
Bouncy Castle Cryptography Library 1.45 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |