aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/rc6/rc6.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/block/rc6/rc6.cpp')
-rw-r--r--src/block/rc6/rc6.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/block/rc6/rc6.cpp b/src/block/rc6/rc6.cpp
index ff846f006..5f88d1d0b 100644
--- a/src/block/rc6/rc6.cpp
+++ b/src/block/rc6/rc6.cpp
@@ -119,9 +119,11 @@ void RC6::key_schedule(const byte key[], u32bit length)
for(u32bit j = 1; j != S.size(); ++j)
S[j] = S[j-1] + 0x9E3779B9;
- SecureVector<u32bit, 8> K;
+ SecureVector<u32bit> K(8);
+
for(s32bit j = length-1; j >= 0; --j)
K[j/4] = (K[j/4] << 8) + key[j];
+
for(u32bit j = 0, A = 0, B = 0; j != MIX_ROUNDS; ++j)
{
A = rotate_left(S[j % S.size()] + A + B, 3);