859241e7263c238cac2ae37fb9794cdc0b73f4a6 kent Tue Apr 2 12:11:41 2013 -0700 Making it generate lowercase a-f rather than uppercase. Didn't realize I'd changed case on last commit, and lower case is more compatible with md5sum program. diff --git src/lib/hex.c src/lib/hex.c index d284209..c339656 100644 --- src/lib/hex.c +++ src/lib/hex.c @@ -1,23 +1,23 @@ /* Handy hexidecimal functions * If you don't want to use printf */ #include "common.h" char hexTab[16] = {'0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', }; + '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', }; /* Convert 0-15 to a hex char */ char nibbleToHex(unsigned char n) /* convert nibble to hexidecimal character. 0 <= n <= 15. */ { return hexTab[n]; } void byteToHex(unsigned char n, char *hex) /* convert byte to hexidecimal characters. 0 <= n <= 255. */ { *hex++ = hexTab[n >> 4]; *hex++ = hexTab[n & 0xf]; }