2001-11-11 Simon Josefsson <jas@extundo.com>
authorSimon Josefsson <jas@extundo.com>
Sun, 11 Nov 2001 10:35:40 +0000 (10:35 +0000)
committerSimon Josefsson <jas@extundo.com>
Sun, 11 Nov 2001 10:35:40 +0000 (10:35 +0000)
* message.el (top-level): Autoload sha1.
(message-canlock-generate): Use sha1 instead of md5 (sha1 used by
canlock, no need to require two different hash algs).  Suggested
by Ferenc Wagner <wferi@bolyai1.elte.hu>.

lisp/ChangeLog
lisp/message.el

index eb8017c..4f8f222 100644 (file)
@@ -1,3 +1,10 @@
+2001-11-11  Simon Josefsson  <jas@extundo.com>
+
+       * message.el (top-level): Autoload sha1.
+       (message-canlock-generate): Use sha1 instead of md5 (sha1 used by
+       canlock, no need to require two different hash algs).  Suggested
+       by Ferenc Wagner <wferi@bolyai1.elte.hu>.
+
 2001-11-09  Simon Josefsson  <jas@extundo.com>
 
        * gnus.el (gnus-local-domain): Fix doc.  From Pavel Jan\e,Bm\e(Bk
index ad53f03..358dda2 100644 (file)
@@ -42,6 +42,7 @@
 (require 'mail-parse)
 (require 'mml)
 (require 'rfc822)
+(autoload 'sha1 "sha1-el")
 
 (defgroup message '((user-mail-address custom-variable)
                    (user-full-name custom-variable))
@@ -2806,10 +2807,10 @@ to find out how to use this."
 (defun message-canlock-generate ()
   "Return a string that is non-trival to guess.
 Do not use this for anything important, it is cryptographically weak."
-  (md5 (concat (message-unique-id)
-              (format "%x%x%x" (random) (random t) (random))
-              (prin1-to-string (recent-keys))
-              (prin1-to-string (garbage-collect)))))
+  (sha1 (concat (message-unique-id)
+               (format "%x%x%x" (random) (random t) (random))
+               (prin1-to-string (recent-keys))
+               (prin1-to-string (garbage-collect)))))
 
 (defun message-canlock-password ()
   "The password used by message for cancel locks.