aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-03-28 19:08:23 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-03-28 19:08:23 +0000
commita2333c8938af4829a8eac8c09615e6652cd412f1 (patch)
tree480f2729015c99231325990516c74a47ee30d8cd /libbb
parent78f9d8eb7adc10f1af8977212f24ab3c418a9c2b (diff)
downloadbusybox-w32-a2333c8938af4829a8eac8c09615e6652cd412f1.tar.gz
busybox-w32-a2333c8938af4829a8eac8c09615e6652cd412f1.tar.bz2
busybox-w32-a2333c8938af4829a8eac8c09615e6652cd412f1.zip
randomtest fixes
Diffstat (limited to 'libbb')
-rw-r--r--libbb/sha1.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/libbb/sha1.c b/libbb/sha1.c
index a07435919..9fa095e85 100644
--- a/libbb/sha1.c
+++ b/libbb/sha1.c
@@ -196,12 +196,11 @@ static void FAST_FUNC sha256_process_block64(sha256_ctx_t *ctx)
196 196
197 /* The actual computation according to FIPS 180-2:6.2.2 step 3. */ 197 /* The actual computation according to FIPS 180-2:6.2.2 step 3. */
198 for (t = 0; t < 64; ++t) { 198 for (t = 0; t < 64; ++t) {
199 /* Need to fetch upper half of sha_K[t] */ 199 /* Need to fetch upper half of sha_K[t]
200#if BB_BIG_ENDIAN 200 * (I hope compiler is clever enough to just fetch
201 uint32_t K_t = ((uint32_t*)(sha_K + t))[0]; 201 * upper half)
202#else 202 */
203 uint32_t K_t = ((uint32_t*)(sha_K + t))[1]; 203 uint32_t K_t = sha_K[t] >> 32;
204#endif
205 uint32_t T1 = h + S1(e) + Ch(e, f, g) + K_t + W[t]; 204 uint32_t T1 = h + S1(e) + Ch(e, f, g) + K_t + W[t];
206 uint32_t T2 = S0(a) + Maj(a, b, c); 205 uint32_t T2 = S0(a) + Maj(a, b, c);
207 h = g; 206 h = g;