From 6e164d33d0237c8236db853fa03528fb29c7e0cd Mon Sep 17 00:00:00 2001 From: ueno Date: Sun, 29 Oct 2006 07:24:36 +0000 Subject: [PATCH] * epa-file.el (epa-file-cache-passphrase-for-symmetric-encryption): New user option. --- ChangeLog | 6 ++++++ epa-file.el | 10 ++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) 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)) -- 1.7.10.4