aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/md5.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/md5.c')
-rw-r--r--fs/cifs/md5.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/cifs/md5.c b/fs/cifs/md5.c
index f13f96d42fcf..462bbfefd4b6 100644
--- a/fs/cifs/md5.c
+++ b/fs/cifs/md5.c
@@ -161,7 +161,7 @@ MD5Final(unsigned char digest[16], struct MD5Context *ctx)
161 161
162/* This is the central step in the MD5 algorithm. */ 162/* This is the central step in the MD5 algorithm. */
163#define MD5STEP(f, w, x, y, z, data, s) \ 163#define MD5STEP(f, w, x, y, z, data, s) \
164 ( w += f(x, y, z) + data, w = w<<s | w>>(32-s), w += x ) 164 (w += f(x, y, z) + data, w = w<<s | w>>(32-s), w += x)
165 165
166/* 166/*
167 * The core of the MD5 algorithm, this alters an existing MD5 hash to 167 * The core of the MD5 algorithm, this alters an existing MD5 hash to
@@ -302,9 +302,8 @@ hmac_md5_init_limK_to_64(const unsigned char *key, int key_len,
302 int i; 302 int i;
303 303
304 /* if key is longer than 64 bytes truncate it */ 304 /* if key is longer than 64 bytes truncate it */
305 if (key_len > 64) { 305 if (key_len > 64)
306 key_len = 64; 306 key_len = 64;
307 }
308 307
309 /* start out by storing key in pads */ 308 /* start out by storing key in pads */
310 memset(ctx->k_ipad, 0, sizeof(ctx->k_ipad)); 309 memset(ctx->k_ipad, 0, sizeof(ctx->k_ipad));
@@ -359,9 +358,9 @@ hmac_md5(unsigned char key[16], unsigned char *data, int data_len,
359{ 358{
360 struct HMACMD5Context ctx; 359 struct HMACMD5Context ctx;
361 hmac_md5_init_limK_to_64(key, 16, &ctx); 360 hmac_md5_init_limK_to_64(key, 16, &ctx);
362 if (data_len != 0) { 361 if (data_len != 0)
363 hmac_md5_update(data, data_len, &ctx); 362 hmac_md5_update(data, data_len, &ctx);
364 } 363
365 hmac_md5_final(digest, &ctx); 364 hmac_md5_final(digest, &ctx);
366} 365}
367#endif 366#endif