5 (let ((keymap (make-sparse-keymap)))
6 (define-key keymap "d" 'epa-dired-do-decrypt)
7 (define-key keymap "v" 'epa-dired-do-verify)
8 (define-key keymap "s" 'epa-dired-do-sign)
9 (define-key keymap "e" 'epa-dired-do-encrypt)
12 (fset 'epa-dired-prefix epa-dired-map)
14 (defun epa-dired-mode-hook ()
15 (define-key dired-mode-map ":" 'epa-dired-prefix))
17 (defun epa-dired-do-decrypt ()
19 (let ((file-list (dired-get-marked-files)))
21 (epa-decrypt-file (car file-list))
22 (setq file-list (cdr file-list)))))
24 (defun epa-dired-do-verify ()
26 (let ((file-list (dired-get-marked-files)))
28 (epa-verify-file (car file-list))
29 (setq file-list (cdr file-list)))))
31 (defun epa-dired-do-sign (&optional detached)
33 (let ((file-list (dired-get-marked-files)))
35 (epa-sign-file (expand-file-name (car file-list)) detached)
36 (setq file-list (cdr file-list)))))
38 (defun epa-dired-do-encrypt ()
40 (let ((file-list (dired-get-marked-files)))
46 (car (epg-key-sub-key-list key))))
47 (epa-select-keys "Select recipents for encryption.
48 If no one is selected, symmetric encryption will be performed. ")))
49 (setq file-list (cdr file-list)))))
53 ;;; epa-dired.el ends here