aboutsummaryrefslogtreecommitdiffstats
path: root/src/hash
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-11-10 23:48:08 +0000
committerlloyd <[email protected]>2009-11-10 23:48:08 +0000
commitd850afae3e3efed7e5a8a8d80a8939e87d9045bc (patch)
tree21e33d78af9ee0bfd10826c65107cbc7bd92d528 /src/hash
parentf2de721b8e0f57ab64a317ee350535829b71b94a (diff)
Slightly cleaner SHA-256 F1 func; ~1% faster
Diffstat (limited to 'src/hash')
-rw-r--r--src/hash/sha2/sha2_32.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hash/sha2/sha2_32.cpp b/src/hash/sha2/sha2_32.cpp
index 7068dd63f..91375df04 100644
--- a/src/hash/sha2/sha2_32.cpp
+++ b/src/hash/sha2/sha2_32.cpp
@@ -38,9 +38,9 @@ inline void F1(u32bit A, u32bit B, u32bit C, u32bit& D,
u32bit E, u32bit F, u32bit G, u32bit& H,
u32bit msg, u32bit magic)
{
- magic += rho(E, 6, 11, 25) + ((E & F) ^ (~E & G)) + msg;
- D += magic + H;
- H += magic + rho(A, 2, 13, 22) + ((A & B) ^ (A & C) ^ (B & C));
+ H += magic + rho(E, 6, 11, 25) + ((E & F) ^ (~E & G)) + msg;
+ D += H;
+ H += rho(A, 2, 13, 22) + ((A & B) | ((A | B) & C));
}
}