aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/idea_sse2
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-09-13 15:21:31 +0000
committerlloyd <[email protected]>2010-09-13 15:21:31 +0000
commit4a7e9edcc92b08a285ea24549fd8c813d10b63b9 (patch)
tree569e357cbc1bd2b195c1b10b281f6c0bbf01fd33 /src/block/idea_sse2
parent27d79c87365105d6128afe9eaf8a82383976ed44 (diff)
First set of changes for avoiding use implicit vector->pointer conversions
Diffstat (limited to 'src/block/idea_sse2')
-rw-r--r--src/block/idea_sse2/idea_sse2.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/block/idea_sse2/idea_sse2.cpp b/src/block/idea_sse2/idea_sse2.cpp
index a7ded37e1..857869115 100644
--- a/src/block/idea_sse2/idea_sse2.cpp
+++ b/src/block/idea_sse2/idea_sse2.cpp
@@ -196,9 +196,11 @@ void idea_op_8(const byte in[64], byte out[64], const u16bit EK[52])
*/
void IDEA_SSE2::encrypt_n(const byte in[], byte out[], u32bit blocks) const
{
+ const u16bit* KS = &this->get_EK()[0];
+
while(blocks >= 8)
{
- idea_op_8(in, out, this->get_EK());
+ idea_op_8(in, out, KS);
in += 8 * BLOCK_SIZE;
out += 8 * BLOCK_SIZE;
blocks -= 8;
@@ -213,9 +215,11 @@ void IDEA_SSE2::encrypt_n(const byte in[], byte out[], u32bit blocks) const
*/
void IDEA_SSE2::decrypt_n(const byte in[], byte out[], u32bit blocks) const
{
+ const u16bit* KS = &this->get_DK()[0];
+
while(blocks >= 8)
{
- idea_op_8(in, out, this->get_DK());
+ idea_op_8(in, out, KS);
in += 8 * BLOCK_SIZE;
out += 8 * BLOCK_SIZE;
blocks -= 8;