From: ueno Date: Sun, 29 Oct 2006 07:24:36 +0000 (+0000) Subject: * epa-file.el X-Git-Tag: epg-0_0_7~2 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e164d33d0237c8236db853fa03528fb29c7e0cd;p=elisp%2Fepg.git * epa-file.el (epa-file-cache-passphrase-for-symmetric-encryption): New user option. --- diff --git a/ChangeLog b/ChangeLog index b9dfa4b..9edc273 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-10-29 Daiki Ueno + + * epa-file.el + (epa-file-cache-passphrase-for-symmetric-encryption): New user + option. + 2006-10-12 Daiki Ueno * epg.el (epg-start-verify): Fixed a clearsign verification bug. diff --git a/epa-file.el b/epa-file.el index 80b1dbb..ff5b65f 100644 --- a/epa-file.el +++ b/epa-file.el @@ -34,13 +34,19 @@ :type 'regexp :group 'epa-file) +(defcustom epa-file-cache-passphrase-for-symmetric-encryption nil + "If t, cache passphrase for symmetric encryption." + :type 'boolean + :group 'epa-file) + (defvar epa-file-handler (cons epa-file-name-regexp 'epa-file-handler)) - + (defvar epa-file-passphrase-alist nil) (defun epa-file-passphrase-callback-function (context key-id file) - (if (eq key-id 'SYM) + (if (and epa-file-cache-passphrase-for-symmetric-encryption + (eq key-id 'SYM)) (let ((entry (assoc file epa-file-passphrase-alist)) passphrase) (or (copy-sequence (cdr entry))