projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
there is no real need for a lib-hash anymore. fold it.
[apps/madmutt.git]
/
md5.c
diff --git
a/lib-hash/md5.c
b/md5.c
similarity index 95%
rename from
lib-hash/md5.c
rename to
md5.c
index
02f4661
..
aa36b26
100644
(file)
--- a/
lib-hash/md5.c
+++ b/
md5.c
@@
-52,8
+52,8
@@
documentation and/or software.
static void MD5Transform (uint32_t[4], unsigned char[64]);
static void Encode (unsigned char *, uint32_t *, unsigned int);
static void Decode (uint32_t *, unsigned char *, unsigned int);
static void MD5Transform (uint32_t[4], unsigned char[64]);
static void Encode (unsigned char *, uint32_t *, unsigned int);
static void Decode (uint32_t *, unsigned char *, unsigned int);
-static void MD5_memcpy (
POINTER, POINTER
, unsigned int);
-static void MD5_memset (
POINTER
, int, unsigned int);
+static void MD5_memcpy (
unsigned char *, unsigned char *
, unsigned int);
+static void MD5_memset (
unsigned char *
, int, unsigned int);
static unsigned char PADDING[64] = {
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
static unsigned char PADDING[64] = {
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@
-135,7
+135,7
@@
void MD5Update (context, input, inputLen)
/* Transform as many times as possible.
*/
if (inputLen >= partLen) {
/* Transform as many times as possible.
*/
if (inputLen >= partLen) {
- MD5_memcpy ((
POINTER) & context->buffer[index], (POINTER
) input, partLen);
+ MD5_memcpy ((
unsigned char *) & context->buffer[index], (unsigned char *
) input, partLen);
MD5Transform (context->state, context->buffer);
for (i = partLen; i + 63 < inputLen; i += 64)
MD5Transform (context->state, context->buffer);
for (i = partLen; i + 63 < inputLen; i += 64)
@@
-148,7
+148,7
@@
void MD5Update (context, input, inputLen)
/* Buffer remaining input */
MD5_memcpy
/* Buffer remaining input */
MD5_memcpy
- ((
POINTER) & context->buffer[index], (POINTER
) & input[i], inputLen - i);
+ ((
unsigned char *) & context->buffer[index], (unsigned char *
) & input[i], inputLen - i);
}
/* MD5 finalization. Ends an MD5 message-digest operation, writing the
}
/* MD5 finalization. Ends an MD5 message-digest operation, writing the
@@
-177,7
+177,7
@@
void MD5Final (digest, context)
/* Zeroize sensitive information.
*/
/* Zeroize sensitive information.
*/
- MD5_memset ((
POINTER
) context, 0, sizeof (*context));
+ MD5_memset ((
unsigned char *
) context, 0, sizeof (*context));
}
/* MD5 basic transformation. Transforms state based on block.
}
/* MD5 basic transformation. Transforms state based on block.
@@
-268,7
+268,7
@@
static void MD5Transform (state, block)
state[3] += d;
/* Zeroize sensitive information. */
state[3] += d;
/* Zeroize sensitive information. */
- MD5_memset ((
POINTER
) x, 0, sizeof (x));
+ MD5_memset ((
unsigned char *
) x, 0, sizeof (x));
}
/* Encodes input (uint32_t) into output (unsigned char). Assumes len is
}
/* Encodes input (uint32_t) into output (unsigned char). Assumes len is
@@
-308,8
+308,8
@@
static void Decode (output, input, len)
*/
static void MD5_memcpy (output, input, len)
*/
static void MD5_memcpy (output, input, len)
-
POINTER
output;
-
POINTER
input;
+
unsigned char *
output;
+
unsigned char *
input;
unsigned int len;
{
unsigned int i;
unsigned int len;
{
unsigned int i;
@@
-321,7
+321,7
@@
static void MD5_memcpy (output, input, len)
/* Note: Replace "for loop" with standard memset if possible.
*/
static void MD5_memset (output, value, len)
/* Note: Replace "for loop" with standard memset if possible.
*/
static void MD5_memset (output, value, len)
-
POINTER
output;
+
unsigned char *
output;
int value;
unsigned int len;
{
int value;
unsigned int len;
{