home *** CD-ROM | disk | FTP | other *** search
/ back2roots/padua / padua.7z / padua / misc / PGPAmi26ui.lha / PGPAmiga / contrib / AmigaELM / EncryptMsg < prev    next >
Encoding:
AmigaDOS Script File  |  1994-05-23  |  997 b   |  40 lines

  1. .KEY cryptfile/A,cryptmode/A
  2. ;
  3. ; EncryptMsg using PGP
  4. ;
  5. ; written by Peter Simons <simons@peti.GUN.de>
  6. ;
  7.  
  8. .BRA {
  9. .KET }
  10. FailAt 1
  11.  
  12. SplitHeadBody <{cryptfile} T:header.$PROCESS T:body.$PROCESS
  13.  
  14. If "{cryptmode}" EQ "ENCRYPT"
  15.         RequestString RECEIPIENTS "Please enter receipient(s) ID(s)..." 256
  16.         PGP -ftea <T:body.$PROCESS >{cryptfile}.asc $RECEIPIENTS
  17.         UnSet $RECEIPIENTS
  18. Else
  19. If "{cryptmode}" EQ "SIGN"
  20.         PGP -ftsa <T:body.$PROCESS >{cryptfile}.asc +clearsig=on
  21. Else
  22. If "{cryptmode}" EQ "ENCRYPT+SIGN"
  23.         RequestString RECEIPIENTS "Please enter receipient(s) ID(s)..." 256
  24.         PGP -ftesa <T:body.$PROCESS >{cryptfile}.asc $RECEIPIENTS
  25.         UnSet $RECEIPIENTS
  26. EndIf
  27. EndIf
  28. EndIf
  29.  
  30. ;
  31. ; now copy the encrypted message back
  32. ; and get rid of our temporary file
  33. ;
  34. Delete {cryptfile} QUIET FORCE
  35. Rename T:header.$PROCESS {cryptfile}
  36. Echo "*N" >>{cryptfile} NOLINE
  37. Type {cryptfile}.asc >>{cryptfile}
  38. Delete {cryptfile}.asc T:header.$PROCESS T:body.$PROCESS QUIET FORCE
  39.  
  40.