aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/square
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-09-13 20:53:31 +0000
committerlloyd <[email protected]>2010-09-13 20:53:31 +0000
commit4fe8a34f1869805d9115f39cad53d1fd7f7eb6c4 (patch)
tree2ff6c30d1a7d5f2244b6f1b459a5ea10b6d43fe0 /src/block/square
parent36bfef27271eadffefbc6891a9d7fa7eed7b1e10 (diff)
Remove more uses of vector to pointer implicit conversions
Diffstat (limited to 'src/block/square')
-rw-r--r--src/block/square/square.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/block/square/square.cpp b/src/block/square/square.cpp
index f96162c37..2d798c3e8 100644
--- a/src/block/square/square.cpp
+++ b/src/block/square/square.cpp
@@ -152,9 +152,10 @@ void Square::key_schedule(const byte key[], u32bit)
XEK[4*i+6] = XEK[4*i+2] ^ XEK[4*i+5];
XEK[4*i+7] = XEK[4*i+3] ^ XEK[4*i+6];
- XDK.copy(28 - 4*i, XEK + 4*(i+1), 4);
+ for(u32bit j = 0; j != 4; ++j)
+ XDK[28 - 4*i + j] = XEK[4*(i+1)+j];
- transform(XEK + 4*i);
+ transform(&XEK[4*i]);
}
for(u32bit i = 0; i != 4; ++i)
@@ -166,8 +167,8 @@ void Square::key_schedule(const byte key[], u32bit)
MD[4*i+j+16] = get_byte(j, XEK[i ]);
}
- EK.copy(XEK + 4, 28);
- DK.copy(XDK + 4, 28);
+ EK.copy(&XEK[4], 28);
+ DK.copy(&XDK[4], 28);
}
/*