Class PGPPBEEncryptedData

    • Method Detail

      • getVersion

        public int getVersion()
        Description copied from class: PGPEncryptedData
        Return the version number of the Encrypted Session Key Packet.
        Overrides:
        getVersion in class PGPEncryptedData
        Returns:
        version
      • getSymmetricAlgorithm

        public int getSymmetricAlgorithm​(PBEDataDecryptorFactory dataDecryptorFactory)
                                  throws PGPException
        Return the symmetric key algorithm required to decrypt the data protected by this object.
        Parameters:
        dataDecryptorFactory - decryptor factory to use to recover the session data.
        Returns:
        session key algorithm identifier (SymmetricKeyAlgorithmTags)
        Throws:
        PGPException - if the session data cannot be recovered.
      • getSessionKey

        public PGPSessionKey getSessionKey​(PBEDataDecryptorFactory dataDecryptorFactory)
                                    throws PGPException
        Return the symmetric session key required to decrypt the data protected by this object.
        Parameters:
        dataDecryptorFactory - decryptor factory used to recover the session data.
        Returns:
        session key
        Throws:
        PGPException - if the session data cannot be recovered
      • getDataStream

        public java.io.InputStream getDataStream​(PBEDataDecryptorFactory dataDecryptorFactory)
                                          throws PGPException
        Open an input stream which will provide the decrypted data protected by this object.
        Parameters:
        dataDecryptorFactory - decryptor factory to use to recover the session data and provide the stream.
        Returns:
        the resulting decrypted input stream, probably containing a sequence of PGP data objects.
        Throws:
        PGPException - if the session data cannot be recovered or the stream cannot be created.
      • getDataStream

        public java.io.InputStream getDataStream​(SessionKeyDataDecryptorFactory dataDecryptorFactory)
                                          throws PGPException
        Deprecated.
        will be removed in 1.74, use PGPEncryptedDataList.extractSessionKeyEncryptedData() and then apply the dataDecryptorFactory.
        Throws:
        PGPException