]> mj.ucw.cz Git - libucw.git/blobdiff - lib/md5hex.c
Save cache misses by keeping a copy of the hash value next to the pointer.
[libucw.git] / lib / md5hex.c
index 2b8d2d88d0ecb380ab6bd1a0117cdb152290aba1..93987b00a13246de55581ded5dd415dae163b10a 100644 (file)
@@ -1,19 +1,19 @@
 /*
- *     Sherlock Library -- MD5 Binary <-> Hex Conversions
+ *     UCW Library -- MD5 Binary <-> Hex Conversions
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997 Martin Mares <mj@ucw.cz>
+ *
+ *     This software may be freely distributed and used according to the terms
+ *     of the GNU Lesser General Public License.
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <unistd.h>
-
 #include "lib/lib.h"
 #include "lib/chartype.h"
 
+#include <stdio.h>
+
 void
-md5_to_hex(byte *s, byte *d)
+md5_to_hex(const byte *s, char *d)
 {
   int i;
   for(i=0; i<MD5_SIZE; i++)
@@ -21,7 +21,7 @@ md5_to_hex(byte *s, byte *d)
 }
 
 void
-hex_to_md5(byte *s, byte *d)
+hex_to_md5(const char *s, byte *d)
 {
   uns i, j;
   for(i=0; i<MD5_SIZE; i++)