Package org.jivesoftware.smackx.ox
Class OpenPgpSelf
java.lang.Object
org.jivesoftware.smackx.ox.OpenPgpContact
org.jivesoftware.smackx.ox.OpenPgpSelf
This class acts as our own OpenPGP identity. It can be seen as a special view on the
OpenPgpStore
, giving
access to our own encryption keys etc.-
Field Summary
Fields inherited from class org.jivesoftware.smackx.ox.OpenPgpContact
jid, store, unfetchableKeys
-
Method Summary
Modifier and TypeMethodDescriptionorg.bouncycastle.openpgp.PGPPublicKeyRingCollection
Return aPGPPublicKeyRingCollection
containing only the public keys belonging to our signing key ring.org.bouncycastle.openpgp.PGPSecretKeyRingCollection
Return aPGPSecretKeyRingCollection
which contains all of ourPGPSecretKeyRing
s.org.pgpainless.key.OpenPgpV4Fingerprint
Return theOpenPgpV4Fingerprint
of our signing key.org.bouncycastle.openpgp.PGPSecretKeyRing
Return thePGPSecretKeyRing
which we will use to sign our messages.boolean
Return true, if we have a usable secret key available.Methods inherited from class org.jivesoftware.smackx.ox.OpenPgpContact
distrust, getAnyPublicKeys, getFingerprintsOfKeysWithState, getJid, getPublicKeysOfTrustState, getTrust, getTrustedAnnouncedKeys, getTrustedFingerprints, getUndecidedFingerprints, getUnfetchableKeys, getUntrustedFingerprints, hasUndecidedKeys, isTrusted, trust, updateKeys, updateKeys
-
Method Details
-
hasSecretKeyAvailable
Return true, if we have a usable secret key available.- Returns:
- true if we have secret key, otherwise false.
- Throws:
IOException
- IO is dangerousorg.bouncycastle.openpgp.PGPException
- PGP is brittle
-
getSecretKeys
public org.bouncycastle.openpgp.PGPSecretKeyRingCollection getSecretKeys() throws IOException, org.bouncycastle.openpgp.PGPExceptionReturn aPGPSecretKeyRingCollection
which contains all of ourPGPSecretKeyRing
s.- Returns:
- collection of our secret keys
- Throws:
IOException
- IO is dangerousorg.bouncycastle.openpgp.PGPException
- PGP is brittle
-
getSigningKeyRing
public org.bouncycastle.openpgp.PGPSecretKeyRing getSigningKeyRing() throws IOException, org.bouncycastle.openpgp.PGPExceptionReturn thePGPSecretKeyRing
which we will use to sign our messages.- Returns:
- signing key
- Throws:
IOException
- IO is dangerousorg.bouncycastle.openpgp.PGPException
- PGP is brittle
-
getSigningKeyFingerprint
public org.pgpainless.key.OpenPgpV4Fingerprint getSigningKeyFingerprint() throws IOException, org.bouncycastle.openpgp.PGPExceptionReturn theOpenPgpV4Fingerprint
of our signing key.- Returns:
- fingerprint of signing key
- Throws:
IOException
- IO is dangerousorg.bouncycastle.openpgp.PGPException
- PGP is brittle
-
getAnnouncedPublicKeys
public org.bouncycastle.openpgp.PGPPublicKeyRingCollection getAnnouncedPublicKeys() throws IOException, org.bouncycastle.openpgp.PGPExceptionReturn aPGPPublicKeyRingCollection
containing only the public keys belonging to our signing key ring. TODO: Add support for public keys of other devices of the owner.- Overrides:
getAnnouncedPublicKeys
in classOpenPgpContact
- Returns:
- public keys
- Throws:
IOException
- IO is dangerous.org.bouncycastle.openpgp.PGPException
- PGP is brittle.
-