httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <ako...@leland.Stanford.EDU>
Subject Re: ap_md5() function is rather useless
Date Sat, 05 Sep 1998 04:23:53 GMT
On Sat, 5 Sep 1998, Rasmus Lerdorf wrote:

> > Why not just add a new one and leave the current API as is?
> Like an ap_md5_binary_safe() function?  That's like a
> ap_function_with_no_bugs() vs. ap_function_with_lots_of_bugs()

Huh? ap_md5() is for strings. C strings. That's why the name of the
argument is "string". That's why the comment in the function says "Take
the Md5 hash of the string argument." That's why it uses ap_pstrdup. Which
also takes strings. I'd guess half that of C functions existing
in the world today work on strings. If you pass them binary data, they
don't work. That doesn't mean they are buggy. Just that they only work on
null-terminated C strings.

If you want a version of ap_md5() that works on non-strings, then write
one. I don't see the big deal.

-- Alexei Kosut <> <>
   Stanford University, Class of 2001 * Apache <> *

View raw message