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.PGPPublicKeyRingCollectionReturn aPGPPublicKeyRingCollectioncontaining only the public keys belonging to our signing key ring.org.bouncycastle.openpgp.PGPSecretKeyRingCollectionReturn aPGPSecretKeyRingCollectionwhich contains all of ourPGPSecretKeyRings.org.pgpainless.key.OpenPgpV4FingerprintReturn theOpenPgpV4Fingerprintof our signing key.org.bouncycastle.openpgp.PGPSecretKeyRingReturn thePGPSecretKeyRingwhich we will use to sign our messages.booleanReturn 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 aPGPSecretKeyRingCollectionwhich contains all of ourPGPSecretKeyRings.- 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 thePGPSecretKeyRingwhich 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 theOpenPgpV4Fingerprintof 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 aPGPPublicKeyRingCollectioncontaining only the public keys belonging to our signing key ring. TODO: Add support for public keys of other devices of the owner.- Overrides:
getAnnouncedPublicKeysin classOpenPgpContact- Returns:
- public keys
- Throws:
IOException- IO is dangerous.org.bouncycastle.openpgp.PGPException- PGP is brittle.
-