X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fcanlock.el;h=6df1266c66a6cbcb6ea7324c637a6feeba5202ac;hb=1744f2fbe4c382d63068903cd867804bd2485d3e;hp=310c9cf97d6bf2331f70f93cee3186b5798e4711;hpb=b3424b97e9e4280ce636cebd62997d80a7d92ac4;p=elisp%2Fgnus.git- diff --git a/lisp/canlock.el b/lisp/canlock.el index 310c9cf..6df1266 100644 --- a/lisp/canlock.el +++ b/lisp/canlock.el @@ -44,8 +44,8 @@ (eval-when-compile (require 'cl)) -(autoload 'sha1 "sha1-el") -(autoload 'sha1-binary "sha1-el") +(require 'sha1-el) + (autoload 'base64-encode-string "base64") (autoload 'mail-fetch-field "mail-utils") (defvar mail-header-separator) @@ -82,8 +82,9 @@ buffer does not look like a news message." (defun canlock-sha1 (message) "Make a SHA-1 digest of MESSAGE as a unibyte string of length 20 bytes." (condition-case nil - (sha1 message nil nil 'binary) - (error + (let (sha1-maximum-internal-length) + (sha1 message nil nil 'binary)) + (wrong-number-of-arguments (canlock-string-as-unibyte (sha1-binary message))))) (defun canlock-make-cancel-key (message-id password)