From: ichikawa Date: Tue, 16 Jun 1998 11:30:45 +0000 (+0000) Subject: Change lisp/pop3-fma.el to crypt/encrypt password using base64 X-Git-Tag: gnus-6_7_7-ichikawa~8 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=f1001ad24ff213d9b0e1a42fd691becd8206cdc2;p=elisp%2Fgnus.git- Change lisp/pop3-fma.el to crypt/encrypt password using base64 --- diff --git a/ChangeLog b/ChangeLog index 23afe38..114dd08 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,16 @@ +1998-06-17 Tatsuya Ichikawa + + * lisp/pop3-fma.el: Add about password document in README-ja.pop3 + Small bug fix. + + * lisp/pop3-fma.el: Delete variable pop3-fma-cypher-key + Use base64-encode-string , base64-decode-string instead. + Both change by Yasuo OKABE + 1998-06-13 Tatsuya Ichikawa * lisp/pop3-fma.el: New function pop3-fma-cypher-string New variable pop3-fma-cypher-key - Both change by Yasuo OKABE 1998-06-07 MORIOKA Tomohiko diff --git a/lisp/pop3-fma.el b/lisp/pop3-fma.el index 74eae7d..062a1d0 100644 --- a/lisp/pop3-fma.el +++ b/lisp/pop3-fma.el @@ -1,14 +1,16 @@ ;; pop3-fma.el.el --- POP3 for Multiple Account for Gnus. ;; Copyright (C) 1996,97,98 Free Software Foundation, Inc. , Tatsuya Ichikawa +;; Yasuo Okabe ;; Author: Tatsuya Ichikawa -;; Version: 0.13 +;; Yasuo OKABE +;; Version: 0.20 ;; Keywords: mail , gnus , pop3 ;; ;; SPECIAL THANKS ;; Keiichi Suzuki ;; Katsumi Yamaoka ;; -;; This file is part of GNU Emacs. +;; This file is not part of GNU Emacs. ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -27,12 +29,16 @@ ;;; Commentary: ;; +;; Note. +;; +;; This file store pop3 password in variable "pop3-fma-password". +;; Please take care by yourself to treat pop3 password. ;; ;; How to use. ;; ;; add your .emacs following codes. ;; -;; (autoload 'pop3-fma-set-pop3-password "pop3-fma") +;; (require 'pop3-fma) ;; (setq pop3-fma-spool-file-alist ;; '( ;; "po:username0@mailhost0.your.domain0" @@ -66,19 +72,25 @@ (` (defvar (, symbol) (, value) (, doc)))) ) +(unless (and (fboundp 'pop3-fma-encode-string) + (fboundp 'pop3-fma-decode-string)) + (require 'mel-b) + (fset 'pop3-fma-encode-string 'base64-encode-string) + (fset 'pop3-fma-decode-string 'base64-decode-string)) + (defgroup pop3-fma nil "Multile POP3 account utility for Gnus." :prefix "pop3-fma-" :group 'mail :group 'news) -(defconst pop3-fma-version-number "0.13") +(defconst pop3-fma-version-number "0.20") (defconst pop3-fma-codename ;; "Feel the wind" ; 0.10 ;; "My home town" ; 0.11 ;; "On the road" ; 0.12 - "Rock'n Roll city" ; 0.13 -;; "Money" ; 0.xx +;; "Rock'n Roll city" ; 0.13 + "Money" ; 0.20 ;; "Midnight blue train" ; 0.xx ;; "Still 19" ; 0.xx ;; "J boy" ; 0.xx @@ -127,17 +139,14 @@ Please do not set this valiable non-nil if you do not use Meadow.") (defvar passwd nil) (defvar str nil) (defvar pop3-fma-movemail-options pop3-fma-movemail-arguments) -(defvar pop3-fma-cypher-key (1+ (random 92))) - -(defun pop3-fma-init-hooks () - (add-hook 'message-send-hook 'pop3-fma-message-add-header)) (eval-after-load "message" - '(pop3-fma-init-hooks)) - + '(lambda () + (add-hook 'message-send-hook 'pop3-fma-message-add-header))) (add-hook 'gnus-after-exiting-gnus-hook '(lambda () (setq pop3-fma-password nil))) (add-hook 'gnus-before-startup-hook 'pop3-fma-set-pop3-password) + ;; ;; ;; Gnus POP3 additional utility... @@ -176,7 +185,7 @@ Please do not set this valiable non-nil if you do not use Meadow.") ;; (defun pop3-fma-read-passwd (mailhost) (setq passwd (nth 2 (assoc mailhost pop3-fma-password))) - (pop3-fma-cypher-string passwd nil t)) + (pop3-fma-decode-string passwd)) (setq pop3-read-passwd 'pop3-fma-read-passwd) ;; @@ -192,11 +201,11 @@ Please do not set this valiable non-nil if you do not use Meadow.") (list pop3-mailhost pop3-maildrop - (pop3-fma-cypher-string passwd))))) + (pop3-fma-encode-string passwd))))) (setcar (cdr (cdr (assoc pop3-mailhost pop3-fma-password))) - passwd)) + (pop3-fma-encode-string passwd))) (message "POP password registered.") - passwd) + (pop3-fma-encode-string passwd)) ;; ;;;###autoload (defun pop3-fma-set-pop3-password() @@ -276,29 +285,6 @@ Argument PROMPT ." (setq hdr (concat str "\n")) (insert-string hdr))))) ;; -;; Crypt password string -;; -(defun pop3-fma-cypher-string (string &optional key flag) - (let ((r nil) - (i 0) - (rot (if flag (- 94 (or key pop3-fma-cypher-key 13)) - (or key pop3-fma-cypher-key 13)))) - (mapcar (lambda (x) - (setq r - (concat r - (cond - ((and (<= 32 x) (<= x 126)) - (char-to-string - (+ (% (+ (- x 32) - (if flag - (+ rot (- 94 i)) - (+ rot i))) - 94) 32))) - (t (char-to-string x))))) - (setq i (1+ i))) - (string-to-char-list string)) - r)) -;; (provide 'pop3-fma) ;; ;; pop3-fma.el ends here.