CA> was wondering if you knew of a way to integrate PGP
> with QEdit 3.0 to either sign or encrypt messages...
This macro assumes you have a D: drive, but you can change that,
for instance making the 'd:\aa.!' bit into 'c:\pgp\plain.txt'
and the 'd:\bb.!' into 'c:\pgp\cipher.txt', or whatever you want
to use as tempfiles. They get erased at the end.
The macro works on a marked line block, which can of course be
the whole file, if you want. The macro takes the block and
dumps a copy of it to a file (d:\aa.!), then encrypts that
(to d:\bb.!). It then erases the block, replacing it with the
encrypted version. The original plaintext is Cut and discarded;
you could make it DeleteBlock instead, or WriteBlock to some
storage file for saving before you discard it.
* (clear)sign/encrypt/cipher line_block with PGP
#F11 MacroBegin SaveFile *
WriteBlock "d:\aa.!" Return * copies block to temp file
Dos "pgp -" Pause * first pause: see Note 1
" d:\aa.! -o d:\bb.! " Pause * second pause: see Note 2
Return BegFile * empties the message of the
GoToBlockBeg Cut * plaintext,
ReadBlock "d:\bb.!" Return * replaces it with the PGP'd
UnMarkBlock * text and unmarks it,
SetScreenOff * turns off the screen display,
EditFile "d:\aa.!" Return * loads the first temp file,
KillFile Quit * deletes it from disk, and
EditFile "d:\bb.!" Return * discards it, and then does
KillFile Quit * the same with the second.
The prompt looks like this at the end just before PGP is run:
.---------------------------------------------------.
| Execute what: |
| pgp -se d:\aa.! -o d:\bb.!. lisa mark |
`---------------------------------------------------'
Note 1: At the first pause, give the commands.
Allowable ones are S, E, SE, C, SC, possibly more.
Sign, Encrypt, both, Cipher, both. Hit Enter when done.
Note 2: At the second, give the addressee(s), if Encrypting.
Something like "oscar" or "ivanova ramirez chen" or "0x4fe".
Any partial strings work, if unique. Multiples allowed.
Enter when done. If using C/S, and no E, just hit Enter alone.
Other assumption: your config.txt is set up for mail, primarily:
Armor = on # produces ascii output.
TextMode = on # use -t option where applicable
Compress = on # enable compression? (Off aids debugging)
ClearSig = on # sign without obscuring plaintext
If you're not set that way, you can add "+clearsig=on" and other
switches in the static text of the command, so that the text
" d:\aa.! -o d:\bb.! " becomes " +clearsig=on d:\aa.! -o d:\bb.! "
or whatever. (And, yes, I know C is technically "conventionally
encrypt" and not "cipher".)
-- SPEED 2.00 #1019: "Excellent!" I cried. "Elementary," said he. * Doyle
--- QScan/PCB v1.17b / 01-0175
---------------
* Origin: Eagle's Nest Comm., Inc Prov, RI 401-621-4600 (1:323/150)
|