digitalmars.D - md5 + coupling
- Matthew (11/11) Jan 27 2005 Speaking of coupling, as we were a short while ago, I note that the md5
- Regan Heath (47/57) Jan 27 2005 AFAIKS there is no reason for it using printf instead of placing the
Speaking of coupling, as we were a short while ago, I note that the md5 module has a printDigest() function, which uses printf(). Is there really any good reason for this method, and its inherent coupling to printf()? It seems pointless to me, since the impl of printDigest() is simply void printDigest(ubyte digest[16]) { foreach (ubyte u; digest) printf("%02x", u); } ???
Jan 27 2005
On Fri, 28 Jan 2005 09:55:50 +1100, Matthew <admin stlsoft.dot.dot.dot.dot.org> wrote:Speaking of coupling, as we were a short while ago, I note that the md5 module has a printDigest() function, which uses printf(). Is there really any good reason for this method, and its inherent coupling to printf()? It seems pointless to me, since the impl of printDigest() is simply void printDigest(ubyte digest[16]) { foreach (ubyte u; digest) printf("%02x", u); }AFAIKS there is no reason for it using printf instead of placing the information into a char[]. My hash code in Deimos uses this function to output all the different digests from all the various hashing methods: Regan
Jan 27 2005