aboutsummaryrefslogtreecommitdiffstats
path: root/src/hash/sha1_sse2/sha1_sse2.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-11-23 04:53:32 +0000
committerlloyd <[email protected]>2008-11-23 04:53:32 +0000
commitecc6e2ef456a924dae287ce6c3326e0b2f65a786 (patch)
tree28303263ab8ccd0f14c1f8fad874f6a23afdb010 /src/hash/sha1_sse2/sha1_sse2.cpp
parent1264c7c8d0da0c2581c75ba787ebe8aad4431a54 (diff)
Revert change that added multiblock support to SSE2 SHA-1. Was causing
a random segfault (always inside an SSE2 intrinsic). Did not investigate much beyond that. Worth looking into since it seemed worth another 1% or so.
Diffstat (limited to 'src/hash/sha1_sse2/sha1_sse2.cpp')
-rw-r--r--src/hash/sha1_sse2/sha1_sse2.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/hash/sha1_sse2/sha1_sse2.cpp b/src/hash/sha1_sse2/sha1_sse2.cpp
index 9f20f69b4..e2e0352fe 100644
--- a/src/hash/sha1_sse2/sha1_sse2.cpp
+++ b/src/hash/sha1_sse2/sha1_sse2.cpp
@@ -12,7 +12,11 @@ namespace Botan {
*************************************************/
void SHA_160_SSE2::compress_n(const byte input[], u32bit blocks)
{
- botan_sha1_sse2_compress(digest, reinterpret_cast<const u32bit*>(input), blocks);
+ for(u32bit i = 0; i != blocks; ++i)
+ {
+ botan_sha1_sse2_compress(digest, reinterpret_cast<const u32bit*>(input));
+ input += HASH_BLOCK_SIZE;
+ }
}
}