httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject APR MD5 routines and EBCDIC (or generic translation)
Date Tue, 02 May 2000 02:25:01 GMT
I guess I'm missing the history here, but after poking around in the
now-in-APR MD5 code and the util_md5.c code I'm confused about the
separation of work between ap_md5digest() and ap_MD5Update().

. ap_MD5Update *always* translates ebcdic2ascii() when CHARSET_EBCDIC
  is defined

. The caller ap_md5digest() translates ascii2ebcdic() before calling
  ap_MD5Update() if the content passed to ap_MD5Update() is to be
  delivered untranslated to the client

Why not avoid the double translation and instead store a translation
flag with the MD5 context if translation is to be performed and have
ap_MD5Update() et al only translate if the flag is set?

Are there some subleties I'm missing that led to the current
translation code in ap_MD5Update() and ap_md5digest()?

(I start to wonder why ap_MD5Update() should have translation logic at
all, but without it there would probably be more code and extra data
copies here and there.)

Does anybody remember or otherwise have an opinion on this?

-- 
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