Diff for /parser3/src/lib/md5/pa_md5c.c between versions 1.6 and 1.16

version 1.6, 2003/01/21 15:51:12 version 1.16, 2013/07/21 02:33:58
Line 3 Line 3
         Replaced ap_ to pa_ prefixes. linked into all targets but Apache-module target,          Replaced ap_ to pa_ prefixes. linked into all targets but Apache-module target,
         where linked targets/apache/pa_md5c.c stub instead.          where linked targets/apache/pa_md5c.c stub instead.
   
         Copyright (c) 2001, 2003 ArtLebedev Group (http://www.artlebedev.com)          Copyright (c) 2001-2012 Art. Lebedev Studio (http://www.artlebedev.com)
 */  */
   
 /*  /*
Line 107 Line 107
  * ----------------------------------------------------------------------------   * ----------------------------------------------------------------------------
  */   */
   
 static const char* IDENT_MD5_C="$Date$";  
   
 #include <string.h>  
   
 #include "pa_md5.h"  #include "pa_md5.h"
 //#include "ap.h"  
 //#ifdef CHARSET_EBCDIC  volatile const char * IDENT_PA_MD5_C="$Id$" IDENT_PA_MD5_H;
 //#include "ebcdic.h"  
 //#endif /*CHARSET_EBCDIC*/  
 //#if HAVE_CRYPT_H  
 //#include <crypt.h>  
 //#endif  
   
 #define pa_pa_cpystrn(strDest, strSource, count) strncpy(strDest, strSource, count)  #define pa_pa_cpystrn(strDest, strSource, count) strncpy(strDest, strSource, count)
   
Line 192  static unsigned char PADDING[64] = Line 183  static unsigned char PADDING[64] =
   
 /* MD5 initialization. Begins an MD5 operation, writing a new context.  /* MD5 initialization. Begins an MD5 operation, writing a new context.
  */   */
 PA_API_EXPORT(void) pa_MD5Init(PA_MD5_CTX *context)  void pa_MD5Init(PA_MD5_CTX *context)
 {  {
     context->count[0] = context->count[1] = 0;      context->count[0] = context->count[1] = 0;
     /* Load magic initialization constants. */      /* Load magic initialization constants. */
Line 206  PA_API_EXPORT(void) pa_MD5Init(PA_MD5_CT Line 197  PA_API_EXPORT(void) pa_MD5Init(PA_MD5_CT
    operation, processing another message block, and updating the     operation, processing another message block, and updating the
    context.     context.
  */   */
 PA_API_EXPORT(void) pa_MD5Update(PA_MD5_CTX *context, const unsigned char *input,  void pa_MD5Update(PA_MD5_CTX *context, const unsigned char *input,
                               unsigned int inputLen)                                unsigned int inputLen)
 {  {
     unsigned int i, idx, partLen;      unsigned int i, idx, partLen;
Line 266  PA_API_EXPORT(void) pa_MD5Update(PA_MD5_ Line 257  PA_API_EXPORT(void) pa_MD5Update(PA_MD5_
 /* MD5 finalization. Ends an MD5 message-digest operation, writing the  /* MD5 finalization. Ends an MD5 message-digest operation, writing the
    the message digest and zeroizing the context.     the message digest and zeroizing the context.
  */   */
 PA_API_EXPORT(void) pa_MD5Final(unsigned char digest[16], PA_MD5_CTX *context)  void pa_MD5Final(unsigned char digest[16], PA_MD5_CTX *context)
 {  {
     unsigned char bits[8];      unsigned char bits[8];
     unsigned int idx, padLen;      unsigned int idx, padLen;
Line 427  static void Decode(UINT4 *output, const Line 418  static void Decode(UINT4 *output, const
  * the FreeBSD 3.0 /usr/src/lib/libcrypt/crypt.c file, which is   * the FreeBSD 3.0 /usr/src/lib/libcrypt/crypt.c file, which is
  * licenced as stated at the top of this file.   * licenced as stated at the top of this file.
  */   */
 PA_API_EXPORT(void) pa_to64(char *s, unsigned long v, int n)  void pa_to64(char *s, unsigned long v, int n)
 {  {
     static unsigned char itoa64[] =         /* 0 ... 63 => ASCII - 64 */      static unsigned char itoa64[] =         /* 0 ... 63 => ASCII - 64 */
         "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";          "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
Line 438  PA_API_EXPORT(void) pa_to64(char *s, uns Line 429  PA_API_EXPORT(void) pa_to64(char *s, uns
     }      }
 }  }
   
 PA_API_EXPORT(void) pa_MD5Encode(const unsigned char *pw,  void pa_MD5Encode(const unsigned char *pw,
                               const unsigned char *salt,                                const unsigned char *salt,
                               char *result, size_t nbytes)                                char *result, size_t nbytes)
 {  {

Removed from v.1.6  
changed lines
  Added in v.1.16


E-mail: