X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fencrypt.el;h=8bf13c2312a5af6e208e1fc8317b8233a1fae802;hb=4cacb5f23eb830e6950dba987063f413977708d7;hp=4f2e29f71790a1778bf0798950bbcc712e48f2a7;hpb=e242274524b4b8afecdaf756051c7f8f281f1626;p=elisp%2Fgnus.git- diff --git a/lisp/encrypt.el b/lisp/encrypt.el index 4f2e29f..8bf13c2 100644 --- a/lisp/encrypt.el +++ b/lisp/encrypt.el @@ -1,5 +1,5 @@ ;;; encrypt.el --- file encryption routines -;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Teodor Zlatanov ;; Created: 2003/01/24 @@ -19,8 +19,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: @@ -33,22 +33,16 @@ ;; autoload password (eval-and-compile (autoload 'password-read "password") - ;; Those two autoloads are needed since T-gnus won't load password.el + ;; The following section is needed since T-gnus won't load password.el ;; by way of pgg.el at the compile time. (autoload 'password-read-and-add "password") - (autoload 'password-cache-remove "password")) + (autoload 'password-cache-remove "password") + (defvar password-cache-expiry)) -(defgroup encrypt nil - "File encryption configuration.") - -(defcustom encrypt-password-cache-expiry 200 - "Encryption password timeout. -When set, directly sets password-cache-expiry" - :type 'integer - :group 'encrypt - :set (lambda (symbol value) - (set symbol value) - (setq password-cache-expiry value))) +(defgroup encrypt '((password-cache custom-variable) + (password-cache-expiry custom-variable)) + "File encryption configuration." + :group 'applications) (defcustom encrypt-file-alist nil "List of file names or regexes matched with encryptions. @@ -98,6 +92,7 @@ Format example: (defvar encrypt-temp-prefix "encrypt" "Prefix for temporary filenames") +;;;###autoload (defun encrypt-find-model (filename) "Given a filename, find a encrypt-file-alist entry" (dolist (entry encrypt-file-alist) @@ -107,6 +102,7 @@ Format example: (string-match match filename)) (return model))))) +;;;###autoload (defun encrypt-insert-file-contents (file &optional model) "Decrypt FILE into the current buffer." (interactive "fFile to insert: ") @@ -222,7 +218,7 @@ Format example: (progn (setq new-list (reverse (split-string bs))) (dolist (x new-list) - (setq x (string-to-int x)) + (setq x (string-to-number x)) (insert (format "%c" (logxor x passphrase-sum)))))) (buffer-substring-no-properties (point-min) (point-max)))))