* pgg-gpg.el (sign-region): Use `pgg-as-lbt'.
authorueno <ueno>
Sat, 6 Nov 1999 11:52:38 +0000 (11:52 +0000)
committerueno <ueno>
Sat, 6 Nov 1999 11:52:38 +0000 (11:52 +0000)
(pgg-gpg-process-region): Use `pgg-convert-lbt-region'.
(encrypt-region): Don't ask passphrase.

pgg-gpg.el

index 0f5a140..dc0bc61 100644 (file)
 (luna-define-method encrypt-region ((scheme pgg-scheme-gpg) 
                                    start end recipients)
   (let* ((pgg-gpg-user-id pgg-default-user-id)
-        (passphrase
-         (pgg-read-passphrase 
-          (format "GnuPG passphrase for %s: " pgg-gpg-user-id)
-          (luna-send scheme 'lookup-key-string
-                     scheme pgg-gpg-user-id 'encrypt)))
         (args 
          `("--batch" "--armor" "--always-trust" "--encrypt"
            ,@(if recipients
                                         (concat "\"" rcpt "\""))) 
                                 recipients))))))
     (pgg-as-lbt start end 'CRLF
-      (pgg-gpg-process-region start end passphrase 
-                             pgg-gpg-program args)
+      (pgg-gpg-process-region start end pgg-gpg-program args)
       )
     (pgg-process-when-success
-      (pgg-convert-lbt-region (point-min)(point-max) 'LF)
-      (let ((packet 
-            (cdr (assq 1 (pgg-parse-armor-region 
-                          (point-min)(point-max))))))
-       (pgg-add-passphrase-cache 
-        (cdr (assq 'key-identifier packet))
-        passphrase)))
+      (pgg-convert-lbt-region (point-min)(point-max) 'LF))
     ))
 
 (luna-define-method decrypt-region ((scheme pgg-scheme-gpg)