Class EncryptionResult

java.lang.Object
org.pgpainless.encryption_signing.EncryptionResult

public final class EncryptionResult extends Object
  • Method Details

    • getEncryptionAlgorithm

      public SymmetricKeyAlgorithm getEncryptionAlgorithm()
      Return the symmetric encryption algorithm used to encrypt the message.
      Returns:
      symmetric encryption algorithm
    • getCompressionAlgorithm

      public CompressionAlgorithm getCompressionAlgorithm()
      Return the compression algorithm that was used to compress the message before encryption/signing.
      Returns:
      compression algorithm
    • getDetachedSignatures

      public MultiMap<SubkeyIdentifier,org.bouncycastle.openpgp.PGPSignature> getDetachedSignatures()
      Return a MultiMap of key identifiers and detached signatures that were generated for the message. Each key of the map represents a signing key, which has one or more detached signatures associated with it.
      Returns:
      detached signatures
    • getRecipients

      public Set<SubkeyIdentifier> getRecipients()
      Return the set of recipient encryption keys.
      Returns:
      recipients
    • getFileName

      public String getFileName()
      Return the file name of the encrypted/signed data.
      Returns:
      filename
    • getModificationDate

      public Date getModificationDate()
      Return the modification date of the encrypted/signed file.
      Returns:
      modification date
    • getFileEncoding

      public StreamEncoding getFileEncoding()
      Return the encoding format of the encrypted/signed data.
      Returns:
      encoding format
    • isForYourEyesOnly

      public boolean isForYourEyesOnly()
      Return true, if the message is marked as for-your-eyes-only. This is typically done by setting the filename "_CONSOLE".
      Returns:
      is message for your eyes only?
    • isEncryptedFor

      public boolean isEncryptedFor(org.bouncycastle.openpgp.PGPPublicKeyRing certificate)
      Returns true, if the message was encrypted for at least one subkey of the given certificate.
      Parameters:
      certificate - certificate
      Returns:
      true if encrypted for 1+ subkeys, false otherwise.
    • builder

      public static EncryptionResult.Builder builder()
      Create a builder for the encryption result class.
      Returns:
      builder