From: okada Date: Fri, 28 Jan 2000 13:34:07 +0000 (+0000) Subject: * md5-el.el (md5-encode): If `md5-maximum-internal-length' is nil, X-Git-Tag: slim-1_13_7~9 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=531581ca056cdd0f3ac8558cef51a0621cd39e51;p=elisp%2Fflim.git * md5-el.el (md5-encode): If `md5-maximum-internal-length' is nil, don't use external md5-program. (md5): Ditto. --- diff --git a/ChangeLog b/ChangeLog index 8f1481e..b5bc48b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 2000-01-23 Kenichi OKADA - * sha1.el (TopLevel): Defun-maybe `sha1-string' when compile. + * md5-el.el (md5-encode): If `md5-maximum-internal-length' is nil, + don't use external md5-program. + (md5): Ditto. 2000-01-23 Kenichi OKADA diff --git a/md5-el.el b/md5-el.el index b4a64e9..a339cec 100644 --- a/md5-el.el +++ b/md5-el.el @@ -121,7 +121,8 @@ Represented as four 16-bit numbers, least significant first.") "Encodes MESSAGE using the MD5 message digest algorithm. MESSAGE must be a string or an array of bytes. Returns a vector of 16 bytes containing the message digest." - (if (<= (length message) md5-maximum-internal-length) + (if (or (null md5-maximum-internal-length) + (<= (length message) md5-maximum-internal-length)) (progn (md5-init) (md5-update message) @@ -387,7 +388,8 @@ hash of a portion of OBJECT." object))) (t nil)) (prog1 - (if (<= (point-max) md5-maximum-internal-length) + (if (or (null md5-maximum-internal-length) + (<= (point-max) md5-maximum-internal-length)) (mapconcat (function (lambda (node) (format "%02x" node))) (md5-encode (buffer-string))