summaryrefslogtreecommitdiff
path: root/src/md5c.c
diff options
context:
space:
mode:
authorJannis Hoffmann <jannis@fehcom.de>2024-07-08 13:24:39 +0200
committerJannis Hoffmann <jannis@fehcom.de>2024-07-08 13:24:39 +0200
commit973ae30e7c4f7a1afb385dd3d8eeea178f981445 (patch)
tree1a5d8be5b3ff273a141b6144bf3031b1bc3deb2d /src/md5c.c
parent66404f0bfbd78e635ff6381ca30b25157e0e1a09 (diff)
fix deprecated prototypes
Diffstat (limited to 'src/md5c.c')
-rw-r--r--src/md5c.c28
1 files changed, 8 insertions, 20 deletions
diff --git a/src/md5c.c b/src/md5c.c
index e539fca..584a34a 100644
--- a/src/md5c.c
+++ b/src/md5c.c
@@ -92,7 +92,7 @@ static unsigned char PADDING[64] = {0x80, 0};
}
/* MD5 initialization. Begins an MD5 operation, writing a new context. */
-void MD5Init(context) MD5_CTX *context; /* context */
+void MD5Init(MD5_CTX *context) /* context */
{
context->count[0] = context->count[1] = 0;
@@ -108,9 +108,7 @@ void MD5Init(context) MD5_CTX *context; /* context */
operation, processing another message block, and updating the
context. */
-void MD5Update(context, input, inputLen) MD5_CTX *context; /* context */
-unsigned char *input; /* input block */
-unsigned int inputLen; /* length of input block */
+void MD5Update(MD5_CTX *context, unsigned char *input, unsigned int inputLen)
{
unsigned int i, index, partLen;
@@ -141,8 +139,7 @@ unsigned int inputLen; /* length of input bl
/* MD5 finalization. Ends an MD5 message-digest operation, writing the
the message digest and zeroizing the context. */
-void MD5Final(digest, context) unsigned char digest[16]; /* message digest */
-MD5_CTX *context; /* context */
+void MD5Final(unsigned char digest[16], MD5_CTX *context)
{
unsigned char bits[8];
unsigned int index, padLen;
@@ -167,8 +164,7 @@ 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];
@@ -258,9 +254,7 @@ unsigned char block[64];
/* Encodes input (UINT4) into output (unsigned char).
Assumes len is a multiple of 4. */
-static void Encode(output, input, len) unsigned char *output;
-UINT4 *input;
-unsigned int len;
+static void Encode(unsigned char *output, UINT4 *input, unsigned int len)
{
unsigned int i, j;
@@ -275,9 +269,7 @@ unsigned int len;
/* Decodes input (unsigned char) into output (UINT4).
Assumes len is a multiple of 4. */
-static void Decode(output, input, len) UINT4 *output;
-unsigned char *input;
-unsigned int len;
+static void Decode(UINT4 *output, unsigned char *input, unsigned int len)
{
unsigned int i, j;
@@ -288,9 +280,7 @@ unsigned int len;
/* Note: Replace "for loop" with standard memcpy if possible. */
-static void MD5_memcpy(output, input, len) POINTER output;
-POINTER input;
-unsigned int len;
+static void MD5_memcpy(POINTER output, POINTER input, unsigned int len)
{
unsigned int i;
@@ -299,9 +289,7 @@ unsigned int len;
/* Note: Replace "for loop" with standard memset if possible. */
-static void MD5_memset(output, value, len) POINTER output;
-int value;
-unsigned int len;
+static void MD5_memset(POINTER output, int value, unsigned int len)
{
unsigned int i;