--- parser3/src/lib/md5/pa_md5c.c 2003/01/31 12:34:33 1.6.2.1 +++ parser3/src/lib/md5/pa_md5c.c 2013/07/21 02:33:58 1.16 @@ -3,7 +3,7 @@ Replaced ap_ to pa_ prefixes. linked into all targets but Apache-module target, 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) */ /* @@ -107,18 +107,9 @@ * ---------------------------------------------------------------------------- */ -static const char* IDENT_MD5_C="$Date: 2003/01/31 12:34:33 $"; - -#include - #include "pa_md5.h" -//#include "ap.h" -//#ifdef CHARSET_EBCDIC -//#include "ebcdic.h" -//#endif /*CHARSET_EBCDIC*/ -//#if HAVE_CRYPT_H -//#include -//#endif + +volatile const char * IDENT_PA_MD5_C="$Id: pa_md5c.c,v 1.16 2013/07/21 02:33:58 moko Exp $" IDENT_PA_MD5_H; #define pa_pa_cpystrn(strDest, strSource, count) strncpy(strDest, strSource, count) @@ -192,7 +183,7 @@ static unsigned char PADDING[64] = /* 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; /* Load magic initialization constants. */ @@ -206,7 +197,7 @@ PA_API_EXPORT(void) pa_MD5Init(PA_MD5_CT operation, processing another message block, and updating the 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 i, idx, partLen; @@ -266,7 +257,7 @@ PA_API_EXPORT(void) pa_MD5Update(PA_MD5_ /* MD5 finalization. Ends an MD5 message-digest operation, writing the 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 int idx, padLen; @@ -427,7 +418,7 @@ static void Decode(UINT4 *output, const * the FreeBSD 3.0 /usr/src/lib/libcrypt/crypt.c file, which is * 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 */ "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; @@ -438,7 +429,7 @@ 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, char *result, size_t nbytes) {