From 531581ca056cdd0f3ac8558cef51a0621cd39e51 Mon Sep 17 00:00:00 2001 From: okada Date: Fri, 28 Jan 2000 13:34:07 +0000 Subject: [PATCH] * md5-el.el (md5-encode): If `md5-maximum-internal-length' is nil, don't use external md5-program. (md5): Ditto. --- ChangeLog | 4 +++- md5-el.el | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) 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)) -- 1.7.10.4