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 the OpenPgpStore, giving access to our own encryption keys etc.
  • Method Details

    • hasSecretKeyAvailable

      public boolean hasSecretKeyAvailable() throws 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:
      IOException - IO is dangerous
      org.bouncycastle.openpgp.PGPException - PGP is brittle
    • getSecretKeys

      public org.bouncycastle.openpgp.PGPSecretKeyRingCollection getSecretKeys() throws IOException, org.bouncycastle.openpgp.PGPException
      Return a PGPSecretKeyRingCollection which contains all of our PGPSecretKeyRings.
      Returns:
      collection of our secret keys
      Throws:
      IOException - IO is dangerous
      org.bouncycastle.openpgp.PGPException - PGP is brittle
    • getSigningKeyRing

      public org.bouncycastle.openpgp.PGPSecretKeyRing getSigningKeyRing() throws IOException, org.bouncycastle.openpgp.PGPException
      Return the PGPSecretKeyRing which we will use to sign our messages.
      Returns:
      signing key
      Throws:
      IOException - IO is dangerous
      org.bouncycastle.openpgp.PGPException - PGP is brittle
    • getSigningKeyFingerprint

      public org.pgpainless.key.OpenPgpV4Fingerprint getSigningKeyFingerprint() throws IOException, org.bouncycastle.openpgp.PGPException
      Return the OpenPgpV4Fingerprint of our signing key.
      Returns:
      fingerprint of signing key
      Throws:
      IOException - IO is dangerous
      org.bouncycastle.openpgp.PGPException - PGP is brittle
    • getAnnouncedPublicKeys

      public org.bouncycastle.openpgp.PGPPublicKeyRingCollection getAnnouncedPublicKeys() throws IOException, org.bouncycastle.openpgp.PGPException
      Return a PGPPublicKeyRingCollection 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 class OpenPgpContact
      Returns:
      public keys
      Throws:
      IOException - IO is dangerous.
      org.bouncycastle.openpgp.PGPException - PGP is brittle.