1 ;;; epa-dired.el --- the EasyPG Assistant, dired extension -*- lexical-binding: t -*-
2 ;; Copyright (C) 2006-2015 Free Software Foundation, Inc.
4 ;; Author: Daiki Ueno <ueno@unixuser.org>
5 ;; Keywords: PGP, GnuPG
8 ;; This file is part of GNU Emacs.
10 ;; GNU Emacs is free software: you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation, either version 3 of the License, or
13 ;; (at your option) any later version.
15 ;; GNU Emacs is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
29 (defun epa-dired-do-decrypt ()
30 "Decrypt marked files."
32 (let ((file-list (dired-get-marked-files)))
34 (epa-decrypt-file (expand-file-name (car file-list
)))
35 (setq file-list
(cdr file-list
)))
39 (defun epa-dired-do-verify ()
40 "Verify marked files."
42 (let ((file-list (dired-get-marked-files)))
44 (epa-verify-file (expand-file-name (car file-list
)))
45 (setq file-list
(cdr file-list
)))))
48 (defun epa-dired-do-sign ()
51 (let ((file-list (dired-get-marked-files)))
54 (expand-file-name (car file-list
))
55 (epa-select-keys (epg-make-context) "Select keys for signing.
56 If no one is selected, default secret key is used. "
58 (y-or-n-p "Make a detached signature? "))
59 (setq file-list
(cdr file-list
)))
63 (defun epa-dired-do-encrypt ()
64 "Encrypt marked files."
66 (let ((file-list (dired-get-marked-files)))
69 (expand-file-name (car file-list
))
70 (epa-select-keys (epg-make-context) "Select recipients for encryption.
71 If no one is selected, symmetric encryption will be performed. "))
72 (setq file-list
(cdr file-list
)))
77 ;;; epa-dired.el ends here