Commit 1e9414a5 authored by tonu@hundin.mysql.fi's avatar tonu@hundin.mysql.fi
Browse files

md5.c renamed MD5* to my_MD5* to avoid clashes with openssl library

md5.c   	when linking to it
md5.h   	renamed MD5* to my_MD5* to avoid clashes with openssl library
md5.h   	when linking to it
parent 196e995c
Loading
Loading
Loading
Loading
+1 −17
Original line number Diff line number Diff line
heikki@donna.mysql.fi
jani@hynda.mysql.fi
jani@janikt.pp.saunalahti.fi
jcole@abel.spaceapes.com
jcole@main.burghcom.com
jcole@tetra.spaceapes.com
monty@donna.mysql.fi
monty@tik.mysql.fi
monty@work.mysql.com
mwagner@evoq.mwagner.org
paul@central.snake.net
root@x3.internalnet
sasha@mysql.sashanet.com
serg@serg.mysql.com
tim@threads.polyesthetic.msg
tim@work.mysql.com
tonu@x3.internalnet
tonu@hundin.mysql.fi
+7 −7
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ Rotation is separate from addition to prevent recomputation.

/* MD5 initialization. Begins an MD5 operation, writing a new context.
 */
void MD5Init (MD5_CTX *context)      /* context */
void my_MD5Init (my_MD5_CTX *context)      /* context */
{
  context->count[0] = context->count[1] = 0;
  /* Load magic initialization constants.
@@ -123,8 +123,8 @@ void MD5Init (MD5_CTX *context) /* context */
  operation, processing another message block, and updating the
  context.
 */
void MD5Update (context, input, inputLen)
MD5_CTX *context;                                        /* context */
void my_MD5Update (context, input, inputLen)
my_MD5_CTX *context;                                        /* context */
unsigned char *input;                                /* input block */
unsigned int inputLen;                     /* length of input block */
{
@@ -164,9 +164,9 @@ unsigned int inputLen; /* length of input block */
/* MD5 finalization. Ends an MD5 message-digest operation, writing the
  the message digest and zeroizing the context.
 */
void MD5Final (digest, context)
void my_MD5Final (digest, context)
unsigned char digest[16];                         /* message digest */
MD5_CTX *context;                                       /* context */
my_MD5_CTX *context;                                       /* context */
{
  unsigned char bits[8];
  unsigned int idx, padLen;
@@ -178,10 +178,10 @@ MD5_CTX *context; /* context */
*/
  idx = (unsigned int)((context->count[0] >> 3) & 0x3f);
  padLen = (idx < 56) ? (56 - idx) : (120 - idx);
  MD5Update (context, PADDING, padLen);
  my_MD5Update (context, PADDING, padLen);

  /* Append length (before padding) */
  MD5Update (context, bits, 8);
  my_MD5Update (context, bits, 8);

  /* Store state in digest */
  Encode (digest, context->state, 16);
+5 −7
Original line number Diff line number Diff line
@@ -57,22 +57,20 @@ If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
#else
#define PROTO_LIST(list) ()
#endif


/* MD5 context. */
typedef struct {
  UINT4 state[4];                                   /* state (ABCD) */
  UINT4 count[2];        /* number of bits, modulo 2^64 (lsb first) */
  unsigned char buffer[64];                         /* input buffer */
} MD5_CTX;
} my_MD5_CTX;

#ifdef __cplusplus
extern "C" {
#endif
       void MD5Init PROTO_LIST ((MD5_CTX *));
       void MD5Update PROTO_LIST
         ((MD5_CTX *, unsigned char *, unsigned int));
       void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *));
       void my_MD5Init PROTO_LIST ((my_MD5_CTX *));
       void my_MD5Update PROTO_LIST
         ((my_MD5_CTX *, unsigned char *, unsigned int));
       void my_MD5Final PROTO_LIST ((unsigned char [16], my_MD5_CTX *));

#ifdef __cplusplus
}