diff options
author | lloyd <[email protected]> | 2008-11-23 02:09:46 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-11-23 02:09:46 +0000 |
commit | 38dabcd7e0d2caa9191e0ec9f5a0f4b77b89ffcf (patch) | |
tree | 7476fb9d51d74ebf0de8e8d86c9cdff5a59f0b2d /src/hash/sha1_ia32 | |
parent | f4ad8ecfa14b59dbf06a9595f8dacccb3b7f04e3 (diff) |
Update SHA1_IA32 to use compress_n
Diffstat (limited to 'src/hash/sha1_ia32')
-rw-r--r-- | src/hash/sha1_ia32/sha1_ia32.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/hash/sha1_ia32/sha1_ia32.cpp b/src/hash/sha1_ia32/sha1_ia32.cpp index ff6e67001..5c3e56a73 100644 --- a/src/hash/sha1_ia32/sha1_ia32.cpp +++ b/src/hash/sha1_ia32/sha1_ia32.cpp @@ -18,9 +18,13 @@ void botan_sha160_ia32_compress(u32bit[5], const byte[64], u32bit[81]); /************************************************* * SHA-160 Compression Function * *************************************************/ -void SHA_160_IA32::hash(const byte input[]) +void SHA_160_IA32::compress_n(const byte input[], u32bit blocks) { - botan_sha160_ia32_compress(digest, input, W); + for(u32bit i = 0; i != blocks; ++i) + { + botan_sha160_ia32_compress(digest, input, W); + input += HASH_BLOCK_SIZE; + } } } |