aboutsummaryrefslogtreecommitdiff
path: root/lib/md5.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-02-20 16:18:26 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-02-20 16:18:26 +0000
commit2ebc821558c32a773cde5b846714396960468dd9 (patch)
treeea6de0e4b5508ce20050898e15ca3afb3640e187 /lib/md5.c
parent907bb78f3ef0f450812b15368f9aa34a4d48d8c9 (diff)
Convert functions to ANSI-style declaration to prevent compiler warnings
Diffstat (limited to 'lib/md5.c')
-rw-r--r--lib/md5.c27
1 files changed, 11 insertions, 16 deletions
diff --git a/lib/md5.c b/lib/md5.c
index a1343d670..269726b96 100644
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -135,12 +135,10 @@ Rotation is separate from addition to prevent recomputation.
/* MD5 initialization. Begins an MD5 operation, writing a new context.
*/
-static void MD5_Init (context)
-struct md5_ctx *context; /* context */
+static void MD5_Init(struct md5_ctx *context)
{
context->count[0] = context->count[1] = 0;
- /* Load magic initialization constants.
-*/
+ /* Load magic initialization constants. */
context->state[0] = 0x67452301;
context->state[1] = 0xefcdab89;
context->state[2] = 0x98badcfe;
@@ -151,10 +149,9 @@ struct md5_ctx *context; /* context */
operation, processing another message block, and updating the
context.
*/
-static void MD5_Update (context, input, inputLen)
-struct md5_ctx *context; /* context */
-unsigned char *input; /* input block */
-unsigned int inputLen; /* length of input block */
+static void MD5_Update (struct md5_ctx *context, /* context */
+ unsigned char *input, /* input block */
+ unsigned int inputLen)/* length of input block */
{
unsigned int i, bufindex, partLen;
@@ -187,11 +184,10 @@ unsigned int inputLen; /* length of input block */
}
/* MD5 finalization. Ends an MD5 message-digest operation, writing the
- the message digest and zeroizing the context.
- */
-static void MD5_Final (digest, context)
-unsigned char digest[16]; /* message digest */
-struct md5_ctx *context; /* context */
+ the message digest and zeroizing the context.
+*/
+static void MD5_Final(unsigned char digest[16], /* message digest */
+ struct md5_ctx *context) /* context */
{
unsigned char bits[8];
unsigned int count, padLen;
@@ -215,9 +211,8 @@ struct md5_ctx *context; /* context */
}
/* MD5 basic transformation. Transforms state based on block. */
-static void MD5Transform (state, block)
-UINT4 state[4];
-unsigned char block[64];
+static void MD5Transform(UINT4 state[4],
+ unsigned char block[64])
{
UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];