(epa-progress-callback-function): Ditto.
* epg.el (epg-passphrase-callback-function): Made it obsolete.
(epg-progress-callback-function): Ditto.
+2006-09-24 Daiki Ueno <ueno@unixuser.org>
+
+ * epa.el (epa-passphrase-callback-function): Moved from epg.el.
+ (epa-progress-callback-function): Ditto.
+ * epg.el (epg-passphrase-callback-function): Made it obsolete.
+ (epg-progress-callback-function): Ditto.
+
2006-09-23 Daiki Ueno <ueno@unixuser.org>
* epg.el (epg-start-decrypt): Append "--" to the end of options.
(setq entry (list file)
epa-file-passphrase-alist (cons entry
epa-file-passphrase-alist)))
- (setq passphrase (epg-passphrase-callback-function context
+ (setq passphrase (epa-passphrase-callback-function context
key-id nil))
(setcdr entry (copy-sequence passphrase))
passphrase)))
- (epg-passphrase-callback-function context key-id nil)))
+ (epa-passphrase-callback-function context key-id nil)))
(defun epa-file-handler (operation &rest args)
(save-match-data
(epg-sign-keys context keys local)
(message "Signing keys...done")))
+(defun epa-passphrase-callback-function (context key-id handback)
+ (if (eq key-id 'SYM)
+ (read-passwd "Passphrase for symmetric encryption: "
+ (eq (epg-context-operation context) 'encrypt))
+ (read-passwd
+ (if (eq key-id 'PIN)
+ "Passphrase for PIN: "
+ (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 epa-progress-callback-function (context what char current total
+ handback)
+ (message "%s: %d%% (%d/%d)" what
+ (if (> total 0) (floor (* (/ current (float total)) 100)) 0)
+ current total))
+
(provide 'epa)
;;; epa.el ends here
(format "Passphrase for %s %s: " key-id (cdr entry))
(format "Passphrase for %s: " key-id)))))))
+(make-obsolete 'epg-passphrase-callback-function "Don't use")
+
(defun epg-progress-callback-function (context what char current total
handback)
(message "%s: %d%% (%d/%d)" what
(if (> total 0) (floor (* (/ current (float total)) 100)) 0)
current total))
+(make-obsolete 'epg-progress-callback-function "Don't use")
+
(defun epg--list-keys-1 (context name mode)
(let ((args (append (if epg-gpg-home-directory
(list "--homedir" epg-gpg-home-directory))
;;; Code:
-(require 'epg)
+(require 'epa)
(eval-when-compile (require 'pgg))
(defvar pgg-epg-secret-key-id-list nil)
(defun pgg-epg-passphrase-callback (context key-id ignore)
(if (eq key-id 'SYM)
- (epg-passphrase-callback-function context key-id nil)
+ (epa-passphrase-callback-function context key-id nil)
(let* ((entry (assoc key-id epg-user-id-alist))
(passphrase
(pgg-read-passphrase