summaryrefslogtreecommitdiff
path: root/source4/lib/crypto/md5.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-05-29 08:11:46 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:21 -0500
commit45e93c19ef95978f908f5b14962770510634cd3b (patch)
tree79e3dd4cb4154b6a90ceaa5fe8d56413a02ebf0e /source4/lib/crypto/md5.c
parentd9538e7412c593a9dc10a600676939d2cf0205ea (diff)
downloadsamba-45e93c19ef95978f908f5b14962770510634cd3b.tar.gz
samba-45e93c19ef95978f908f5b14962770510634cd3b.tar.bz2
samba-45e93c19ef95978f908f5b14962770510634cd3b.zip
r943: change samba4 to use 'uint8_t' instead of 'unsigned char'
metze (This used to be commit b5378803fdcb3b3afe7c2932a38828e83470f61a)
Diffstat (limited to 'source4/lib/crypto/md5.c')
-rw-r--r--source4/lib/crypto/md5.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source4/lib/crypto/md5.c b/source4/lib/crypto/md5.c
index dbb3462bd4..a393fc2532 100644
--- a/source4/lib/crypto/md5.c
+++ b/source4/lib/crypto/md5.c
@@ -27,7 +27,7 @@ static void MD5Transform(uint32_t buf[4], uint32_t const in[16]);
/*
* Note: this code is harmless on little-endian machines.
*/
-static void byteReverse(unsigned char *buf, unsigned longs)
+static void byteReverse(uint8_t *buf, unsigned longs)
{
uint32_t t;
do {
@@ -57,7 +57,7 @@ void MD5Init(struct MD5Context *ctx)
* Update context to reflect the concatenation of another buffer full
* of bytes.
*/
-void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len)
+void MD5Update(struct MD5Context *ctx, uint8_t const *buf, unsigned len)
{
register uint32_t t;
@@ -73,7 +73,7 @@ void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len)
/* Handle any leading odd-sized chunks */
if (t) {
- unsigned char *p = (unsigned char *) ctx->in + t;
+ uint8_t *p = (uint8_t *) ctx->in + t;
t = 64 - t;
if (len < t) {
@@ -105,10 +105,10 @@ void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len)
* Final wrapup - pad to 64-byte boundary with the bit pattern
* 1 0* (64-bit count of bits processed, MSB-first)
*/
-void MD5Final(unsigned char digest[16], struct MD5Context *ctx)
+void MD5Final(uint8_t digest[16], struct MD5Context *ctx)
{
unsigned int count;
- unsigned char *p;
+ uint8_t *p;
/* Compute number of bytes mod 64 */
count = (ctx->bits[0] >> 3) & 0x3F;
@@ -141,7 +141,7 @@ void MD5Final(unsigned char digest[16], struct MD5Context *ctx)
((uint32_t *) ctx->in)[15] = ctx->bits[1];
MD5Transform(ctx->buf, (uint32_t *) ctx->in);
- byteReverse((unsigned char *) ctx->buf, 4);
+ byteReverse((uint8_t *) ctx->buf, 4);
memmove(digest, ctx->buf, 16);
memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
}