public interface OpenPgpKeyStore
| Modifier and Type | Method and Description |
|---|---|
void |
deletePublicKeyRing(org.jxmpp.jid.BareJid owner,
org.pgpainless.key.OpenPgpV4Fingerprint fingerprint)
Remove a
PGPPublicKeyRing which contains the key described by fingerprint from the
PGPPublicKeyRingCollection of owner. |
void |
deleteSecretKeyRing(org.jxmpp.jid.BareJid owner,
org.pgpainless.key.OpenPgpV4Fingerprint fingerprint)
Remove a
PGPSecretKeyRing which contains the key described by fingerprint from the
PGPSecretKeyRingCollection of owner. |
org.pgpainless.key.collection.PGPKeyRing |
generateKeyRing(org.jxmpp.jid.BareJid owner)
Generate a new
PGPKeyRing for owner. |
java.util.Map<org.pgpainless.key.OpenPgpV4Fingerprint,java.util.Date> |
getPublicKeyFetchDates(org.jxmpp.jid.BareJid contact)
Return the last date on which keys of
contact were fetched from PubSub. |
org.bouncycastle.openpgp.PGPPublicKeyRing |
getPublicKeyRing(org.jxmpp.jid.BareJid owner,
org.pgpainless.key.OpenPgpV4Fingerprint fingerprint)
Return the
PGPPublicKeyRing of owner which contains the key described by fingerprint. |
org.bouncycastle.openpgp.PGPPublicKeyRingCollection |
getPublicKeysOf(org.jxmpp.jid.BareJid owner)
Return the
PGPPublicKeyRingCollection containing all public keys of owner that are locally
available. |
org.bouncycastle.openpgp.PGPSecretKeyRing |
getSecretKeyRing(org.jxmpp.jid.BareJid owner,
org.pgpainless.key.OpenPgpV4Fingerprint fingerprint)
Return the
PGPSecretKeyRing of owner which contains the key described by fingerprint. |
org.bouncycastle.openpgp.PGPSecretKeyRingCollection |
getSecretKeysOf(org.jxmpp.jid.BareJid owner)
Return the
PGPSecretKeyRingCollection containing all secret keys of owner which are locally
available. |
void |
importPublicKey(org.jxmpp.jid.BareJid owner,
org.bouncycastle.openpgp.PGPPublicKeyRing publicKeys)
Import a
PGPPublicKeyRing of owner. |
void |
importSecretKey(org.jxmpp.jid.BareJid owner,
org.bouncycastle.openpgp.PGPSecretKeyRing secretKeys)
Import a
PGPSecretKeyRing of owner. |
void |
setPublicKeyFetchDates(org.jxmpp.jid.BareJid contact,
java.util.Map<org.pgpainless.key.OpenPgpV4Fingerprint,java.util.Date> dates)
Set the last date on which keys of
contact were fetched from PubSub. |
org.bouncycastle.openpgp.PGPPublicKeyRingCollection getPublicKeysOf(org.jxmpp.jid.BareJid owner)
throws java.io.IOException,
org.bouncycastle.openpgp.PGPException
PGPPublicKeyRingCollection containing all public keys of owner that are locally
available.
This method might return null.owner - BareJid of the user we want to get keys from.PGPPublicKeyRingCollection of the user.java.io.IOException - IO is dangerousorg.bouncycastle.openpgp.PGPException - PGP is brittleorg.bouncycastle.openpgp.PGPSecretKeyRingCollection getSecretKeysOf(org.jxmpp.jid.BareJid owner)
throws java.io.IOException,
org.bouncycastle.openpgp.PGPException
PGPSecretKeyRingCollection containing all secret keys of owner which are locally
available.
This method might return null.owner - BareJid of the user we want to get keys from.PGPSecretKeyRingCollection of the user.java.io.IOException - IO is dangerousorg.bouncycastle.openpgp.PGPException - PGP is brittleorg.bouncycastle.openpgp.PGPPublicKeyRing getPublicKeyRing(org.jxmpp.jid.BareJid owner,
org.pgpainless.key.OpenPgpV4Fingerprint fingerprint)
throws java.io.IOException,
org.bouncycastle.openpgp.PGPException
PGPPublicKeyRing of owner which contains the key described by fingerprint.
This method might return null.owner - BareJid of the keys ownerfingerprint - OpenPgpV4Fingerprint of a key contained in the key ringPGPPublicKeyRing which contains the key described by fingerprint.java.io.IOException - IO is dangerousorg.bouncycastle.openpgp.PGPException - PGP is brittleorg.bouncycastle.openpgp.PGPSecretKeyRing getSecretKeyRing(org.jxmpp.jid.BareJid owner,
org.pgpainless.key.OpenPgpV4Fingerprint fingerprint)
throws java.io.IOException,
org.bouncycastle.openpgp.PGPException
PGPSecretKeyRing of owner which contains the key described by fingerprint.
This method might return null.owner - BareJid of the keys ownerfingerprint - OpenPgpV4Fingerprint of a key contained in the key ringPGPSecretKeyRing which contains the key described by fingerprint.java.io.IOException - IO is dangerousorg.bouncycastle.openpgp.PGPException - PGP is brittlevoid deletePublicKeyRing(org.jxmpp.jid.BareJid owner,
org.pgpainless.key.OpenPgpV4Fingerprint fingerprint)
throws java.io.IOException,
org.bouncycastle.openpgp.PGPException
PGPPublicKeyRing which contains the key described by fingerprint from the
PGPPublicKeyRingCollection of owner.owner - owner of the key ringfingerprint - fingerprint of the key whose key ring will be removed.java.io.IOException - IO is dangerousorg.bouncycastle.openpgp.PGPException - PGP is brittlevoid deleteSecretKeyRing(org.jxmpp.jid.BareJid owner,
org.pgpainless.key.OpenPgpV4Fingerprint fingerprint)
throws java.io.IOException,
org.bouncycastle.openpgp.PGPException
PGPSecretKeyRing which contains the key described by fingerprint from the
PGPSecretKeyRingCollection of owner.owner - owner of the key ringfingerprint - fingerprint of the key whose key ring will be removed.java.io.IOException - IO is dangerousorg.bouncycastle.openpgp.PGPException - PGP is brittleorg.pgpainless.key.collection.PGPKeyRing generateKeyRing(org.jxmpp.jid.BareJid owner)
throws org.bouncycastle.openpgp.PGPException,
java.security.NoSuchAlgorithmException,
java.security.NoSuchProviderException,
java.security.InvalidAlgorithmParameterException
PGPKeyRing for owner.
The key will have a user-id containing the users BareJid (eg. "xmpp:juliet@capulet.lit").
This method MUST NOT return null.owner - owner of the key ring.org.bouncycastle.openpgp.PGPException - PGP is brittlejava.security.NoSuchAlgorithmException - in case there is no Provider registered for the used
OpenPGP algorithms.java.security.NoSuchProviderException - in case there is no suitable Provider registered.java.security.InvalidAlgorithmParameterException - in case an invalid algorithms configuration is used.void importSecretKey(org.jxmpp.jid.BareJid owner,
org.bouncycastle.openpgp.PGPSecretKeyRing secretKeys)
throws java.io.IOException,
org.bouncycastle.openpgp.PGPException,
MissingUserIdOnKeyException
PGPSecretKeyRing of owner.
In case the key ring is already available locally, the keys are skipped.owner - owner of the keyssecretKeys - secret keysjava.io.IOException - IO is dangerousorg.bouncycastle.openpgp.PGPException - PGP is brittleMissingUserIdOnKeyException - in case the secret keys are lacking a user-id with the owners jid.void importPublicKey(org.jxmpp.jid.BareJid owner,
org.bouncycastle.openpgp.PGPPublicKeyRing publicKeys)
throws java.io.IOException,
org.bouncycastle.openpgp.PGPException,
MissingUserIdOnKeyException
PGPPublicKeyRing of owner.
In case the key ring is already available locally, the keys are skipped.owner - owner of the keyspublicKeys - public keysjava.io.IOException - IO is dangerousorg.bouncycastle.openpgp.PGPException - PGP is brittleMissingUserIdOnKeyException - in case the public keys are lacking a user-id with the owners jid.java.util.Map<org.pgpainless.key.OpenPgpV4Fingerprint,java.util.Date> getPublicKeyFetchDates(org.jxmpp.jid.BareJid contact)
throws java.io.IOException
contact were fetched from PubSub.
This method MUST NOT return null.contact - contact in which we are interested.java.io.IOException - IO is dangerousvoid setPublicKeyFetchDates(org.jxmpp.jid.BareJid contact,
java.util.Map<org.pgpainless.key.OpenPgpV4Fingerprint,java.util.Date> dates)
throws java.io.IOException
contact were fetched from PubSub.contact - contact in which we are interested.dates - dates of last key fetching.java.io.IOException - IO is dangerous