Package org.jivesoftware.smackx.ox
Class OpenPgpSelf
- java.lang.Object
-
- org.jivesoftware.smackx.ox.OpenPgpContact
-
- org.jivesoftware.smackx.ox.OpenPgpSelf
-
public class OpenPgpSelf extends OpenPgpContact
This class acts as our own OpenPGP identity. It can be seen as a special view on theOpenPgpStore, giving access to our own encryption keys etc.
-
-
Field Summary
-
Fields inherited from class org.jivesoftware.smackx.ox.OpenPgpContact
jid, store, unfetchableKeys
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.bouncycastle.openpgp.PGPPublicKeyRingCollectiongetAnnouncedPublicKeys()Return aPGPPublicKeyRingCollectioncontaining only the public keys belonging to our signing key ring.org.bouncycastle.openpgp.PGPSecretKeyRingCollectiongetSecretKeys()Return aPGPSecretKeyRingCollectionwhich contains all of ourPGPSecretKeyRings.org.pgpainless.key.OpenPgpV4FingerprintgetSigningKeyFingerprint()Return theOpenPgpV4Fingerprintof our signing key.org.bouncycastle.openpgp.PGPSecretKeyRinggetSigningKeyRing()Return thePGPSecretKeyRingwhich we will use to sign our messages.booleanhasSecretKeyAvailable()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 Detail
-
hasSecretKeyAvailable
public boolean hasSecretKeyAvailable() throws java.io.IOException, org.bouncycastle.openpgp.PGPException
Return true, if we have a usable secret key available.- Returns:
- true if we have secret key, otherwise false.
- Throws:
java.io.IOException- IO is dangerousorg.bouncycastle.openpgp.PGPException- PGP is brittle
-
getSecretKeys
public org.bouncycastle.openpgp.PGPSecretKeyRingCollection getSecretKeys() throws java.io.IOException, org.bouncycastle.openpgp.PGPException
Return aPGPSecretKeyRingCollectionwhich contains all of ourPGPSecretKeyRings.- Returns:
- collection of our secret keys
- Throws:
java.io.IOException- IO is dangerousorg.bouncycastle.openpgp.PGPException- PGP is brittle
-
getSigningKeyRing
public org.bouncycastle.openpgp.PGPSecretKeyRing getSigningKeyRing() throws java.io.IOException, org.bouncycastle.openpgp.PGPException
Return thePGPSecretKeyRingwhich we will use to sign our messages.- Returns:
- signing key
- Throws:
java.io.IOException- IO is dangerousorg.bouncycastle.openpgp.PGPException- PGP is brittle
-
getSigningKeyFingerprint
public org.pgpainless.key.OpenPgpV4Fingerprint getSigningKeyFingerprint() throws java.io.IOException, org.bouncycastle.openpgp.PGPException
Return theOpenPgpV4Fingerprintof our signing key.- Returns:
- fingerprint of signing key
- Throws:
java.io.IOException- IO is dangerousorg.bouncycastle.openpgp.PGPException- PGP is brittle
-
getAnnouncedPublicKeys
public org.bouncycastle.openpgp.PGPPublicKeyRingCollection getAnnouncedPublicKeys() throws java.io.IOException, org.bouncycastle.openpgp.PGPException
Return 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:
java.io.IOException- IO is dangerous.org.bouncycastle.openpgp.PGPException- PGP is brittle.
-
-