diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-02-08 17:46:49 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-02-08 17:46:49 +0100 |
commit | fb6e689554a03dd3c22783a641880ee4c2bed8e7 (patch) | |
tree | 254a63ec82aa6adc5962ba67394b9e7563ec84d7 | |
parent | 73ccd0ca879b3b3958fc15fad9565aa97ee04884 (diff) | |
download | busybox-w32-fb6e689554a03dd3c22783a641880ee4c2bed8e7.tar.gz busybox-w32-fb6e689554a03dd3c22783a641880ee4c2bed8e7.tar.bz2 busybox-w32-fb6e689554a03dd3c22783a641880ee4c2bed8e7.zip |
libbb/md5.c: remove wrong comment
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | libbb/md5.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/libbb/md5.c b/libbb/md5.c index 768dfbcb7..a98631d0c 100644 --- a/libbb/md5.c +++ b/libbb/md5.c | |||
@@ -247,7 +247,7 @@ static void md5_hash_block(const void *buffer, md5_ctx_t *ctx) | |||
247 | OP(D, A, B, C, 12, 0xfd987193); | 247 | OP(D, A, B, C, 12, 0xfd987193); |
248 | OP(C, D, A, B, 17, 0xa679438e); | 248 | OP(C, D, A, B, 17, 0xa679438e); |
249 | OP(B, C, D, A, 22, 0x49b40821); | 249 | OP(B, C, D, A, 22, 0x49b40821); |
250 | # endif/* MD5_SIZE_VS_SPEED == 1 */ | 250 | # endif /* MD5_SIZE_VS_SPEED == 1 */ |
251 | 251 | ||
252 | /* For the second to fourth round we have the possibly swapped words | 252 | /* For the second to fourth round we have the possibly swapped words |
253 | in CORRECT_WORDS. Redefine the macro to take an additional first | 253 | in CORRECT_WORDS. Redefine the macro to take an additional first |
@@ -286,7 +286,7 @@ static void md5_hash_block(const void *buffer, md5_ctx_t *ctx) | |||
286 | OP(FG, D, A, B, C, 2, 9, 0xfcefa3f8); | 286 | OP(FG, D, A, B, C, 2, 9, 0xfcefa3f8); |
287 | OP(FG, C, D, A, B, 7, 14, 0x676f02d9); | 287 | OP(FG, C, D, A, B, 7, 14, 0x676f02d9); |
288 | OP(FG, B, C, D, A, 12, 20, 0x8d2a4c8a); | 288 | OP(FG, B, C, D, A, 12, 20, 0x8d2a4c8a); |
289 | # endif/* MD5_SIZE_VS_SPEED == 1 */ | 289 | # endif /* MD5_SIZE_VS_SPEED == 1 */ |
290 | 290 | ||
291 | /* Round 3. */ | 291 | /* Round 3. */ |
292 | # if MD5_SIZE_VS_SPEED == 1 | 292 | # if MD5_SIZE_VS_SPEED == 1 |
@@ -313,7 +313,7 @@ static void md5_hash_block(const void *buffer, md5_ctx_t *ctx) | |||
313 | OP(FH, D, A, B, C, 12, 11, 0xe6db99e5); | 313 | OP(FH, D, A, B, C, 12, 11, 0xe6db99e5); |
314 | OP(FH, C, D, A, B, 15, 16, 0x1fa27cf8); | 314 | OP(FH, C, D, A, B, 15, 16, 0x1fa27cf8); |
315 | OP(FH, B, C, D, A, 2, 23, 0xc4ac5665); | 315 | OP(FH, B, C, D, A, 2, 23, 0xc4ac5665); |
316 | # endif/* MD5_SIZE_VS_SPEED == 1 */ | 316 | # endif /* MD5_SIZE_VS_SPEED == 1 */ |
317 | 317 | ||
318 | /* Round 4. */ | 318 | /* Round 4. */ |
319 | # if MD5_SIZE_VS_SPEED == 1 | 319 | # if MD5_SIZE_VS_SPEED == 1 |
@@ -373,7 +373,8 @@ void FAST_FUNC md5_hash(const void *buffer, size_t len, md5_ctx_t *ctx) | |||
373 | unsigned i = 64 - ctx->buflen; | 373 | unsigned i = 64 - ctx->buflen; |
374 | 374 | ||
375 | /* Copy data into aligned buffer. */ | 375 | /* Copy data into aligned buffer. */ |
376 | if (i > len) i = len; | 376 | if (i > len) |
377 | i = len; | ||
377 | memcpy(ctx->buffer + ctx->buflen, buf, i); | 378 | memcpy(ctx->buffer + ctx->buflen, buf, i); |
378 | len -= i; | 379 | len -= i; |
379 | ctx->buflen += i; | 380 | ctx->buflen += i; |
@@ -391,9 +392,6 @@ void FAST_FUNC md5_hash(const void *buffer, size_t len, md5_ctx_t *ctx) | |||
391 | * in first 16 bytes following RESBUF. The result is always in little | 392 | * in first 16 bytes following RESBUF. The result is always in little |
392 | * endian byte order, so that a byte-wise output yields to the wanted | 393 | * endian byte order, so that a byte-wise output yields to the wanted |
393 | * ASCII representation of the message digest. | 394 | * ASCII representation of the message digest. |
394 | * | ||
395 | * IMPORTANT: On some systems it is required that RESBUF is correctly | ||
396 | * aligned for a 32 bits value. | ||
397 | */ | 395 | */ |
398 | void FAST_FUNC md5_end(void *resbuf, md5_ctx_t *ctx) | 396 | void FAST_FUNC md5_end(void *resbuf, md5_ctx_t *ctx) |
399 | { | 397 | { |