* epg.el (epg-reset): Don't reset result.
[elisp/epg.git] / epg-file.el
index 856af40..17c2dd4 100644 (file)
@@ -67,8 +67,15 @@ with GnuPG."
       (let ((coding-system-for-write 'binary)
             (coding-system-for-read 'binary)
            (context (epg-make-context))
+           recipients
+           string
            cipher)
-       (when (setq cipher (epg-encrypt-string context (buffer-string) nil))
+       (while (not (equal (setq string
+                                (read-string "To (end with an empty line): "))
+                          ""))
+         (setq recipients (cons string recipients)))
+       (when (setq cipher (epg-encrypt-string context (buffer-string)
+                                              recipients))
          (if (and (memq system-type '(ms-dos windows-nt))
                   (boundp 'buffer-file-type))
              (setq buffer-file-type t))
@@ -152,3 +159,7 @@ with GnuPG."
   (setq auto-mode-alist
        (cons (list epg-file-name-regexp nil 'strip-suffix)
              auto-mode-alist)))
+
+(provide 'epg-file)
+
+;;; epg-file.el ends here