From: ueno Date: Wed, 12 Apr 2006 07:43:12 +0000 (+0000) Subject: * epg-file.el (epg-file-write-region): Support public key encryption. X-Git-Tag: epgsm-branchpoint~120 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=3fc4ae4242f5d89bdab6d6fdfcfb58e7703ada0f;p=elisp%2Fepg.git * epg-file.el (epg-file-write-region): Support public key encryption. * epg.el (epg-passphrase-callback-function): Always display key-id. --- diff --git a/ChangeLog b/ChangeLog index e69de29..16b5c5d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -0,0 +1,6 @@ +2006-04-12 Daiki Ueno + + * epg-file.el (epg-file-write-region): Support public key encryption. + + * epg.el (epg-passphrase-callback-function): Always display key-id. + diff --git a/epg-file.el b/epg-file.el index dc48030..17c2dd4 100644 --- a/epg-file.el +++ b/epg-file.el @@ -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)) diff --git a/epg.el b/epg.el index 330e7c4..6a3401d 100644 --- a/epg.el +++ b/epg.el @@ -461,11 +461,10 @@ This function is for internal use only." "Passphrase for symmetric encryption: " (if (eq key-id 'PIN) "Passphrase for PIN: " - (format "Passphrase for %s: " - (let ((entry (assoc key-id epg-user-id-alist))) - (if entry - (cdr entry) - key-id))))))) + (let ((entry (assoc key-id epg-user-id-alist))) + (if entry + (format "Passphrase for %s %s: " key-id (cdr entry)) + (format "Passphrase for %s: " key-id))))))) (defun epg-progress-callback-function (what char current total handback) (message "%s: %d%%/%d%%" what current total))