diff options
Diffstat (limited to 'src/hash/sha1_sse2')
-rw-r--r-- | src/hash/sha1_sse2/sha1_sse2.cpp | 8 | ||||
-rw-r--r-- | src/hash/sha1_sse2/sha1_sse2.h | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/hash/sha1_sse2/sha1_sse2.cpp b/src/hash/sha1_sse2/sha1_sse2.cpp index 1d47cb1df..e2e0352fe 100644 --- a/src/hash/sha1_sse2/sha1_sse2.cpp +++ b/src/hash/sha1_sse2/sha1_sse2.cpp @@ -10,9 +10,13 @@ namespace Botan { /************************************************* * SHA-160 Compression Function * *************************************************/ -void SHA_160_SSE2::hash(const byte input[]) +void SHA_160_SSE2::compress_n(const byte input[], u32bit blocks) { - botan_sha1_sse2_compress(digest, reinterpret_cast<const u32bit*>(input)); + for(u32bit i = 0; i != blocks; ++i) + { + botan_sha1_sse2_compress(digest, reinterpret_cast<const u32bit*>(input)); + input += HASH_BLOCK_SIZE; + } } } diff --git a/src/hash/sha1_sse2/sha1_sse2.h b/src/hash/sha1_sse2/sha1_sse2.h index 4bd8c1baa..57348e461 100644 --- a/src/hash/sha1_sse2/sha1_sse2.h +++ b/src/hash/sha1_sse2/sha1_sse2.h @@ -19,7 +19,7 @@ class BOTAN_DLL SHA_160_SSE2 : public SHA_160 HashFunction* clone() const { return new SHA_160_SSE2; } SHA_160_SSE2() : SHA_160(0) {} // no W needed private: - void hash(const byte[]); + void compress_n(const byte[], u32bit blocks); }; extern "C" void botan_sha1_sse2_compress(u32bit[5], const u32bit*); |