Article: 14751 of alt.security.pgp
From: mark.shadley@southwest.org (Mark Shadley)
Newsgroups: alt.security.pgp
Subject: PGP & Qedit?
Date: Mon, 10 Oct 1994 22:50:00 GMT
Organization: SouthWest Consulting - BBS Line 818-285-8684
Lines: 60        

In article <5c8_9410061700@midrange.com>
gibbs@midrange.com (David Gibbs) wrote:

> Does anyone know of a good interface from the MS-DOS edit QEDIT to PGP?

> Ideally I'd like a macro key that will take the message I'm writing, and
> create an ascii-armored, signed (clear-signed?), message that's encrypted
> or not.

Give these a shot.

*************  The file being signed or encrypted MUST  *************
**************    be the only file loaded in QEdit.    **************

* ClearSign the current file.
* note: make a batch file called PGPS.BAT (put it in your path),
* with the line: pgp -s +clearsig=on %1 %2 %3
* Qedit seems to choke on the '+'

@\      SetScreenOff SaveFile
        Dos 'pgps ' CurrentFilename ' -o unique' Return
        Pause BegFile DropAnchor EndFile MarkBlockEnd Cut BegFile
        EditFile 'unique.asc ' Return
        DropAnchor EndFile MarkBlockEnd Cut NextFile
        Paste UnMarkBlock NextFile KillFile Quit

* Sign and encrypt the current file

@'      SetScreenOff SaveFile
        Dos 'pgp -se ' CurrentFilename ' -o unique' Return Pause
        Begfile DropAnchor EndFile MarkBlockEnd Cut BegFile
        EditFile 'unique.asc ' Return
        DropAnchor EndFile MarkBlockEnd Cut NextFile
        Paste UnMarkBlock NextFile KillFile Quit

* Conventionally encrypt the current file.

@[      SetScreenOff SaveFile
        Dos 'pgp -c ' CurrentFilename ' -o unique' Return Pause
        Begfile DropAnchor EndFile MarkBlockEnd Cut BegFile
        EditFile 'unique.asc ' Return
        DropAnchor EndFile MarkBlockEnd Cut NextFile
        Paste UnMarkBlock NextFile KillFile Quit

* Decrypt the current file

@;      SetScreenOff
        Dos 'if exist decrypt*.* del decrypt*.* '
        Return Return SaveFile SetInsMode
        Find '-----BEGIN PGP MESSAGE-----' Return Return
        DropAnchor
        Find '-----END PGP MESSAGE-----' Return Return
        EndLine MarkBlockEnd
        WriteBlock 'decrypt.tmp' Return 'O'
        GotoBlockBeg BegLine DeleteBlock
        Dos 'pgp decrypt.tmp -o decrypt' Return Pause
        ReadBlock 'decrypt' Return UnMarkBlock
