httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@hyperreal.org
Subject cvs commit: apache-1.3/src/main util_md5.c
Date Sun, 06 Sep 1998 17:12:19 GMT
ben         98/09/06 10:12:19

  Modified:    src/include util_md5.h
               src/main util_md5.c
  Log:
  Add binary MD5.
  Reviewed by:	Martin Kraemer
  
  Revision  Changes    Path
  1.16      +2 -1      apache-1.3/src/include/util_md5.h
  
  Index: util_md5.h
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/include/util_md5.h,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- util_md5.h	1998/05/29 18:20:49	1.15
  +++ util_md5.h	1998/09/06 17:12:18	1.16
  @@ -64,7 +64,8 @@
   
   #include "ap_md5.h"
   
  -API_EXPORT(char *) ap_md5(pool *a, unsigned char *string);
  +API_EXPORT(char *) ap_md5(pool *a, const unsigned char *string);
  +API_EXPORT(char *) ap_md5_binary(pool *a, const unsigned char *buf, int len);
   API_EXPORT(char *) ap_md5contextTo64(pool *p, AP_MD5_CTX * context);
   API_EXPORT(char *) ap_md5digest(pool *p, FILE *infile);
   
  
  
  
  1.15      +7 -2      apache-1.3/src/main/util_md5.c
  
  Index: util_md5.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/main/util_md5.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- util_md5.c	1998/04/11 12:00:32	1.14
  +++ util_md5.c	1998/09/06 17:12:18	1.15
  @@ -87,7 +87,7 @@
   #include "httpd.h"
   #include "util_md5.h"
   
  -API_EXPORT(char *) ap_md5(pool *p, unsigned char *string)
  +API_EXPORT(char *) ap_md5_binary(pool *p, const unsigned char *buf, int length)
   {
       AP_MD5_CTX my_md5;
       unsigned char hash[16];
  @@ -99,7 +99,7 @@
        */
   
       ap_MD5Init(&my_md5);
  -    ap_MD5Update(&my_md5, string, strlen((const char *) string));
  +    ap_MD5Update(&my_md5, buf, length);
       ap_MD5Final(hash, &my_md5);
   
       for (i = 0, r = result; i < 16; i++, r += 2)
  @@ -107,6 +107,11 @@
       *r = '\0';
   
       return ap_pstrdup(p, result);
  +}
  +
  +API_EXPORT(char *) ap_md5(pool *p, const unsigned char *string)
  +{
  +    return ap_md5_binary(p, string, strlen(string));
   }
   
   /* these portions extracted from mpack, John G. Myers - jgm+@cmu.edu */
  
  
  

Mime
View raw message