diff options
author | lloyd <[email protected]> | 2009-08-12 18:19:39 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-08-12 18:19:39 +0000 |
commit | 1c9b4fda79951b1d0cd3c49ad8db8549cf9d9444 (patch) | |
tree | 70a5c3a1d5efb116092addbe85f94e494b389434 /src/block | |
parent | d7d27466ce03fc7870dd7d5ba3eda922675ad7e2 (diff) |
For handling the last few blocks in Serpent_SSE2, invoke encrypt_n with
however many blocks remain, rather than looping calling encrypt_n with
a block size of 1 each time.
Diffstat (limited to 'src/block')
-rw-r--r-- | src/block/serpent_sse2/serp_sse2.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/block/serpent_sse2/serp_sse2.cpp b/src/block/serpent_sse2/serp_sse2.cpp index a3319afec..c51bb69ab 100644 --- a/src/block/serpent_sse2/serp_sse2.cpp +++ b/src/block/serpent_sse2/serp_sse2.cpp @@ -218,12 +218,7 @@ void Serpent_SSE2::encrypt_n(const byte in[], byte out[], u32bit blocks) const blocks -= 4; } - for(u32bit i = 0; i != blocks; ++i) - { - Serpent::encrypt_n(in, out, 1); - in += BLOCK_SIZE; - out += BLOCK_SIZE; - } + Serpent::encrypt_n(in, out, blocks); } /* @@ -239,12 +234,7 @@ void Serpent_SSE2::decrypt_n(const byte in[], byte out[], u32bit blocks) const blocks -= 4; } - for(u32bit i = 0; i != blocks; ++i) - { - Serpent::decrypt_n(in, out, 1); - in += BLOCK_SIZE; - out += BLOCK_SIZE; - } + Serpent::decrypt_n(in, out, blocks); } } |