File: process.cc

package info (click to toggle)
guncat 2.02.00-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 524 kB
  • sloc: cpp: 1,076; makefile: 105; sh: 37; ansic: 10
file content (34 lines) | stat: -rw-r--r-- 1,070 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#define XERR
#include "decryptor.ih"

    // in: current input file, at 'PGP MESSAGE'
void Decryptor::process(istream &in)    // , ostream &out)
{
xerr("");
                                                    // obtain the PGP MESSAGE
    PGPSection pgpSection{ in, *d_pgpMessage };

    if (g_verbose)
         *g_verbose << fileInfo() << ": PGP HEADER" << endl;

    clearFiles();                                   // resize d_pgpMessage and
                                                    // d_decrypted to 0-size

                                                    // get the (complete)
    if (pgpSection.complete())                      // PGP section
    {
        if (not d_options.pgpRanges())              // decrypt it unless only
            decrypt(pgpSection);                    // ranges are requested
        return;
    }
                                                    // unless suppressed:
    if (not d_options.skipIncomplete())             // show the INcomplete
        cout << d_pgpMessage->rdbuf();              // PGP MESSAGE
}