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.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/block/rc6/rc6.cpp b/src/block/rc6/rc6.cpp
index 42d00878f..5a6c1091d 100644
--- a/src/block/rc6/rc6.cpp
+++ b/src/block/rc6/rc6.cpp
@@ -113,6 +113,8 @@ void RC6::decrypt_n(const byte in[], byte out[], size_t blocks) const
*/
void RC6::key_schedule(const byte key[], size_t length)
{
+ S.resize(44);
+
const size_t WORD_KEYLENGTH = (((length - 1) / 4) + 1);
const size_t MIX_ROUNDS = 3 * std::max(WORD_KEYLENGTH, S.size());