diff options
Diffstat (limited to 'src/hash/sha1_sse2/sha1_sse2.cpp')
-rw-r--r-- | src/hash/sha1_sse2/sha1_sse2.cpp | 8 |
1 files changed, 6 insertions, 2 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; + } } } |