aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2021-12-28 09:05:12 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2021-12-28 09:05:12 +0100
commitf1d06462e872270f38c497e36f8cd018ee7415bf (patch)
treed5c905ac5cdd80cc892d6154dda3b5e78b074a38
parent44075929a8b9c1861d15564fa6ac4562abb724d7 (diff)
downloadbusybox-w32-f1d06462e872270f38c497e36f8cd018ee7415bf.tar.gz
busybox-w32-f1d06462e872270f38c497e36f8cd018ee7415bf.tar.bz2
busybox-w32-f1d06462e872270f38c497e36f8cd018ee7415bf.zip
libbb: cose shrink in sha1
function old new delta sha1_process_block64 356 342 -14 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--libbb/hash_md5_sha.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libbb/hash_md5_sha.c b/libbb/hash_md5_sha.c
index e0db8ce67..a468397e3 100644
--- a/libbb/hash_md5_sha.c
+++ b/libbb/hash_md5_sha.c
@@ -523,9 +523,6 @@ static void FAST_FUNC sha1_process_block64(sha1_ctx_t *ctx)
523 work = (work & b) ^ d; 523 work = (work & b) ^ d;
524 if (j <= 3) 524 if (j <= 3)
525 goto ge16; 525 goto ge16;
526 /* Used to do SWAP_BE32 here, but this
527 * requires ctx (see comment above) */
528 work += W[cnt];
529 } else { 526 } else {
530 if (i == 2) 527 if (i == 2)
531 work = ((b | c) & d) | (b & c); 528 work = ((b | c) & d) | (b & c);
@@ -533,14 +530,14 @@ static void FAST_FUNC sha1_process_block64(sha1_ctx_t *ctx)
533 work ^= b; 530 work ^= b;
534 ge16: 531 ge16:
535 W[cnt] = W[cnt+16] = rotl32(W[cnt+13] ^ W[cnt+8] ^ W[cnt+2] ^ W[cnt], 1); 532 W[cnt] = W[cnt+16] = rotl32(W[cnt+13] ^ W[cnt+8] ^ W[cnt+2] ^ W[cnt], 1);
536 work += W[cnt];
537 } 533 }
534 work += W[cnt];
538 work += e + rotl32(a, 5) + rconsts[i]; 535 work += e + rotl32(a, 5) + rconsts[i];
539 536
540 /* Rotate by one for next time */ 537 /* Rotate by one for next time */
541 e = d; 538 e = d;
542 d = c; 539 d = c;
543 c = /* b = */ rotl32(b, 30); 540 c = rotl32(b, 30);
544 b = a; 541 b = a;
545 a = work; 542 a = work;
546 cnt = (cnt + 1) & 15; 543 cnt = (cnt + 1) & 15;