httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ras...@lerdorf.on.ca (Rasmus Lerdorf)
Subject Re: ap_md5() function is rather useless
Date Sat, 05 Sep 1998 04:28:37 GMT
> 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.

But it is a trivial change to make the current one binary safe.  Sort of
silly to restrict it to strings only where there is no decent reason to.
I don't really care though.  It was more as a convenience to other module
writers.  I have my own binary-safe md5() function.

-Rasmus


Mime
View raw message