aboutsummaryrefslogtreecommitdiff
path: root/src/common/md5.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/md5.cc')
-rw-r--r--src/common/md5.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/common/md5.cc b/src/common/md5.cc
index 4f1ac8ca..b6e710da 100644
--- a/src/common/md5.cc
+++ b/src/common/md5.cc
@@ -31,7 +31,7 @@ static void byteReverse(unsigned char *buf, unsigned longs)
do {
t = (u32) ((unsigned) buf[3] << 8 | buf[2]) << 16 |
((unsigned) buf[1] << 8 | buf[0]);
- *(u32 *) buf = t;
+ *(u32*) buf = t;
buf += 4;
} while (--longs);
}
@@ -74,7 +74,7 @@ void MD5Update(struct MD5Context *ctx, unsigned char const *buf, size_t len)
/* Handle any leading odd-sized chunks */
if (t) {
- unsigned char *p = (unsigned char *) ctx->in + t;
+ unsigned char *p = (unsigned char*) ctx->in + t;
t = 64 - t;
if (len < t) {
@@ -83,7 +83,7 @@ void MD5Update(struct MD5Context *ctx, unsigned char const *buf, size_t len)
}
memcpy(p, buf, t);
byteReverse(ctx->in, 16);
- MD5Transform(ctx->buf, (u32 *) ctx->in);
+ MD5Transform(ctx->buf, (u32*) ctx->in);
buf += t;
len -= t;
}
@@ -92,7 +92,7 @@ void MD5Update(struct MD5Context *ctx, unsigned char const *buf, size_t len)
while (len >= 64) {
memcpy(ctx->in, buf, 64);
byteReverse(ctx->in, 16);
- MD5Transform(ctx->buf, (u32 *) ctx->in);
+ MD5Transform(ctx->buf, (u32*) ctx->in);
buf += 64;
len -= 64;
}
@@ -127,7 +127,7 @@ void MD5Final(unsigned char digest[16], struct MD5Context *ctx)
/* Two lots of padding: Pad the first block to 64 bytes */
memset(p, 0, count);
byteReverse(ctx->in, 16);
- MD5Transform(ctx->buf, (u32 *) ctx->in);
+ MD5Transform(ctx->buf, (u32*) ctx->in);
/* Now fill the next block with 56 bytes */
memset(ctx->in, 0, 56);
@@ -141,8 +141,8 @@ void MD5Final(unsigned char digest[16], struct MD5Context *ctx)
memcpy(&ctx->in[14], &ctx->bits[0], sizeof(u32));
memcpy(&ctx->in[15], &ctx->bits[1], sizeof(u32));
- MD5Transform(ctx->buf, (u32 *) ctx->in);
- byteReverse((unsigned char *) ctx->buf, 4);
+ MD5Transform(ctx->buf, (u32*) ctx->in);
+ byteReverse((unsigned char*) ctx->buf, 4);
memcpy(digest, ctx->buf, 16);
memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */
}