diff options
Diffstat (limited to 'src/block/rc6')
-rw-r--r-- | src/block/rc6/rc6.cpp | 2 | ||||
-rw-r--r-- | src/block/rc6/rc6.h | 4 |
2 files changed, 3 insertions, 3 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()); diff --git a/src/block/rc6/rc6.h b/src/block/rc6/rc6.h index d3270daf7..e30a267e6 100644 --- a/src/block/rc6/rc6.h +++ b/src/block/rc6/rc6.h @@ -21,11 +21,9 @@ class BOTAN_DLL RC6 : public Block_Cipher_Fixed_Params<16, 1, 32> void encrypt_n(const byte in[], byte out[], size_t blocks) const; void decrypt_n(const byte in[], byte out[], size_t blocks) const; - void clear() { zeroise(S); } + void clear() { S.clear(); } std::string name() const { return "RC6"; } BlockCipher* clone() const { return new RC6; } - - RC6() : S(44) {} private: void key_schedule(const byte[], size_t); |