|
Cryptix OpenPGP | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcryptix.pki.KeyBundle
cryptix.openpgp.PGPKeyBundle
An OpenPGP KeyBundle.
Constructor Summary | |
protected |
PGPKeyBundle(java.lang.String type)
Create a new KeyBundle object with the given type. |
Method Summary | |
abstract boolean |
addPrivateSubKey(java.security.PrivateKey privsubkey,
java.security.PublicKey pubsubkey)
Adds a private subkey to the keybundle, without encrypting it. |
abstract boolean |
addPrivateSubKey(java.security.PrivateKey privsubkey,
java.security.PublicKey pubsubkey,
char[] passphrase,
java.security.SecureRandom sr)
Adds a private subkey to the keybundle, encrypting it with the given passphrase. |
abstract boolean |
addPublicSubKey(java.security.PublicKey pubsubkey,
KeyBundle other)
Adds a subkey to a keybundle (borrows binding signature from another keybundle). |
abstract boolean |
addPublicSubKey(java.security.PublicKey subkey,
java.security.PrivateKey signkey)
Adds a public subkey to a keybundle, calculating binding signature. |
abstract boolean |
containsPrivateKey()
Returns whether this KeyBundle contains a Private Key. |
abstract java.util.Date |
getExpirationDate()
Returns the expiration date, or null of the keybundle does not expire Note: this method assumes that all self signed certificates in this keybundle are correctly signed and not revoked. |
abstract java.security.PrivateKey |
getPrivateSubKey(java.security.PublicKey pubsubkey,
char[] passphrase)
Return the private key corresponding to the given public key, decrypting it with the given passphrase. |
abstract java.util.Iterator |
getPublicSubKeys()
Returns an iterator over all subkeys contained within this bundle The objects returned by the iterator will all be instances of cryptix.openpgp.PGPPublicKey |
abstract boolean |
isLegacy()
Returns whether this is a keybundle containing a legacy key |
abstract boolean |
removePrivateSubKey(java.security.PublicKey pubsubkey)
Removes the private subkey corresponding to the given public subkey. |
abstract boolean |
removePublicSubKey(java.security.PublicKey pubsubkey)
Removes a public subkey. |
Methods inherited from class cryptix.pki.KeyBundle |
addCertificate, addPrincipal, addPrivateKey, addPrivateKey, addPublicKey, clone, equals, getCertificates, getCertificates, getEncoded, getPrincipals, getPrivateKey, getPublicKeys, getType, hashCode, removeCertificate, removePrincipal, removePrivateKey, removePublicKey |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected PGPKeyBundle(java.lang.String type)
Method Detail |
public abstract boolean containsPrivateKey()
public abstract boolean addPublicSubKey(java.security.PublicKey subkey, java.security.PrivateKey signkey) throws KeyBundleException
KeyBundleException
public abstract boolean addPublicSubKey(java.security.PublicKey pubsubkey, KeyBundle other) throws KeyBundleException
KeyBundleException
public abstract boolean addPrivateSubKey(java.security.PrivateKey privsubkey, java.security.PublicKey pubsubkey, char[] passphrase, java.security.SecureRandom sr) throws KeyBundleException
KeyBundleException
public abstract boolean addPrivateSubKey(java.security.PrivateKey privsubkey, java.security.PublicKey pubsubkey) throws KeyBundleException
KeyBundleException
public abstract boolean removePublicSubKey(java.security.PublicKey pubsubkey) throws KeyBundleException
KeyBundleException
public abstract boolean removePrivateSubKey(java.security.PublicKey pubsubkey) throws KeyBundleException
KeyBundleException
public abstract java.util.Iterator getPublicSubKeys()
The objects returned by the iterator will all be instances of cryptix.openpgp.PGPPublicKey
public abstract java.security.PrivateKey getPrivateSubKey(java.security.PublicKey pubsubkey, char[] passphrase) throws java.security.UnrecoverableKeyException
Returns null if no private key is available
java.security.UnrecoverableKeyException
public abstract java.util.Date getExpirationDate() throws KeyBundleException
Note: this method assumes that all self signed certificates in this keybundle are correctly signed and not revoked. It does not verify this. When getting a key from an untrusted source, these should thus be checked first.
KeyBundleException
public abstract boolean isLegacy()
|
Cryptix OpenPGP | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |