httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@ibm.net>
Subject Re: hooks
Date Thu, 06 Jul 2000 13:53:15 GMT
> Date: Wed, 5 Jul 2000 13:12:21 -0700
> From: "Life is hard, and then you die" <ronald@innovation.ch>

> Btw., does anybody disagree with changing the update functions in
> md5 and sha1 to ap_MD5Update_ascii(), ap_MD5Update_binary(),
> ap_SHA1Update_ascii(), and ap_SHA1Update_binary()? I.e. to better
> reflect which are ascii and which binary (the ascii forms first
> translate the characters as necessary to ascii). And similarly
> for ap_base64. Currently we have ap_SHA1Update() and
> ap_SHA1Update_binary() in 1.3.

A. MD5:

Currently:

  single call to ap_MD5Init()
  optional single call to ap_MD5SetXlate()
  multiple calls to ap_MD5Update()
  single call to ap_MD5Final()

Your proposal (I guess):

  single call to ap_MD5Init()
  multiple calls to either ap_MD5Update_ascii() or ap_MD5Update_binary()
  single call to ap_MD5Final()

1) _ascii is a mis-nomer for this feature; we don't know or care what
   type of translation is performed (if it is done); since this is
   content, it could be anything

2) I like the current API better because once the app sets up the
   translation properly it doesn't have to have dual paths later
   (Hmmm... do I call ap_MD5Update_ascii() or ap_MD5Update_binary()?)

You could get rid of ap_MD5SetXlate() and provide an additional
parameter to ap_MD5Init() if you want to simplify it.

B. SHA1

This is definitely hard-wired for EBCDIC currently.  The API set could
be changed to be more similar to the MD5 one, but you'll need to
change more code in the utilities to be EBCDIC-aware.  It is ugly
either way, but until some app needs a different type of translation
for SHA1, I think the code savings (and the related smaller amount of
EBCDIC awareness in Apache) with the current API set is worth the
ugliness.  #ifdef EBCDIC is pretty ugly to me, and I are EBCDIC for at
least part of the day.

C. base64

no real opinion...  I don't have a notion of how much app-level code
would get changed (and possibly uglified).  You'll find out soon
enough.

Best wishes,

Jeff
-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...

Mime
View raw message