aboutsummaryrefslogtreecommitdiff
path: root/lib/md4.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-04-20 15:17:42 +0200
committerDaniel Stenberg <daniel@haxx.se>2011-04-27 09:09:35 +0200
commitb903186fa0189ff241d756d25d07fdfe9885ae49 (patch)
treebd942ac8753469172661b0d30153986378337fdf /lib/md4.c
parent592eda8e3feb1bf8d0f85c2baa485323b315f9d9 (diff)
source cleanup: unify look, style and indent levels
By the use of a the new lib/checksrc.pl script that checks that our basic source style rules are followed.
Diffstat (limited to 'lib/md4.c')
-rw-r--r--lib/md4.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/md4.c b/lib/md4.c
index ecf3bfcd8..84c520210 100644
--- a/lib/md4.c
+++ b/lib/md4.c
@@ -113,19 +113,19 @@ static void MD4Update(MD4_CTX *context, const unsigned char *input,
/* Compute number of bytes mod 64 */
bufindex = (unsigned int)((context->count[0] >> 3) & 0x3F);
/* Update number of bits */
- if ((context->count[0] += ((UINT4)inputLen << 3))
- < ((UINT4)inputLen << 3))
+ if((context->count[0] += ((UINT4)inputLen << 3))
+ < ((UINT4)inputLen << 3))
context->count[1]++;
context->count[1] += ((UINT4)inputLen >> 29);
partLen = 64 - bufindex;
/* Transform as many times as possible.
*/
- if (inputLen >= partLen) {
+ if(inputLen >= partLen) {
memcpy(&context->buffer[bufindex], input, partLen);
MD4Transform (context->state, context->buffer);
- for (i = partLen; i + 63 < inputLen; i += 64)
+ for(i = partLen; i + 63 < inputLen; i += 64)
MD4Transform (context->state, &input[i]);
bufindex = 0;
@@ -251,7 +251,7 @@ static void Encode(unsigned char *output, UINT4 *input, unsigned int len)
{
unsigned int i, j;
- for (i = 0, j = 0; j < len; i++, j += 4) {
+ for(i = 0, j = 0; j < len; i++, j += 4) {
output[j] = (unsigned char)(input[i] & 0xff);
output[j+1] = (unsigned char)((input[i] >> 8) & 0xff);
output[j+2] = (unsigned char)((input[i] >> 16) & 0xff);
@@ -262,11 +262,12 @@ static void Encode(unsigned char *output, UINT4 *input, unsigned int len)
/* Decodes input (unsigned char) into output (UINT4). Assumes len is
a multiple of 4.
*/
-static void Decode (UINT4 *output, const unsigned char *input, unsigned int len)
+static void Decode (UINT4 *output, const unsigned char *input,
+ unsigned int len)
{
unsigned int i, j;
- for (i = 0, j = 0; j < len; i++, j += 4)
+ for(i = 0, j = 0; j < len; i++, j += 4)
output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) |
(((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
}