aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbb/hash_md5_sha.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libbb/hash_md5_sha.c b/libbb/hash_md5_sha.c
index f5f875a64..aeacddef8 100644
--- a/libbb/hash_md5_sha.c
+++ b/libbb/hash_md5_sha.c
@@ -461,9 +461,7 @@ void FAST_FUNC md5_end(md5_ctx_t *ctx, void *resbuf)
461 /* MD5 stores total in LE, need to swap on BE arches: */ 461 /* MD5 stores total in LE, need to swap on BE arches: */
462 common64_end(ctx, /*swap_needed:*/ BB_BIG_ENDIAN); 462 common64_end(ctx, /*swap_needed:*/ BB_BIG_ENDIAN);
463 463
464 /* The MD5 result is in little endian byte order. 464 /* The MD5 result is in little endian byte order */
465 * We (ab)use the fact that A-D are consecutive in memory.
466 */
467#if BB_BIG_ENDIAN 465#if BB_BIG_ENDIAN
468 ctx->hash[0] = SWAP_LE32(ctx->hash[0]); 466 ctx->hash[0] = SWAP_LE32(ctx->hash[0]);
469 ctx->hash[1] = SWAP_LE32(ctx->hash[1]); 467 ctx->hash[1] = SWAP_LE32(ctx->hash[1]);