code: public InputStream decryptFile(InputStream inputStream, String passPhrase) throws IOException {
  
      PGPEncryptedDataList enc = getPGPEncryptedDataList(inputStream);
      PGPPBEEncryptedData pbe = (PGPPBEEncryptedData) enc.get(0);
      InputStream clear;
  
      try {
        clear = pbe.getDataStream(new JcePBEDataDecryptorFactoryBuilder(
            new JcaPGPDigestCalculatorProviderBuilder().setProvider(BouncyCastleProvider.PROVIDER_NAME).build())
                .setProvider(BouncyCastleProvider.PROVIDER_NAME).build(passPhrase.toCharArray()));
  
        JcaPGPObjectFactory pgpFact = new JcaPGPObjectFactory(clear);
  
        return new LazyMaterializeDecryptorInputStream(pgpFact);
      } catch (PGPException e) {
        throw new IOException(e);
      }
    }
docs: Taking in a file inputstream and a passPhrase, generate a decrypted file inputstream.
  @param inputStream file inputstream
  @param passPhrase passPhrase
  @return
  @throws IOException