aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/rc2
diff options
context:
space:
mode:
Diffstat (limited to 'src/block/rc2')
-rw-r--r--src/block/rc2/rc2.cpp1
-rw-r--r--src/block/rc2/rc2.h4
2 files changed, 2 insertions, 3 deletions
diff --git a/src/block/rc2/rc2.cpp b/src/block/rc2/rc2.cpp
index 98e76ecfc..548c2f095 100644
--- a/src/block/rc2/rc2.cpp
+++ b/src/block/rc2/rc2.cpp
@@ -135,6 +135,7 @@ void RC2::key_schedule(const byte key[], size_t length)
for(s32bit i = 127-length; i >= 0; --i)
L[i] = TABLE[L[i+1] ^ L[i+length]];
+ K.resize(64);
load_le<u16bit>(&K[0], &L[0], 64);
}
diff --git a/src/block/rc2/rc2.h b/src/block/rc2/rc2.h
index dc78b06fc..223c48792 100644
--- a/src/block/rc2/rc2.h
+++ b/src/block/rc2/rc2.h
@@ -28,11 +28,9 @@ class BOTAN_DLL RC2 : public Block_Cipher_Fixed_Params<8, 1, 32>
*/
static byte EKB_code(size_t bits);
- void clear() { zeroise(K); }
+ void clear() { K.clear(); }
std::string name() const { return "RC2"; }
BlockCipher* clone() const { return new RC2; }
-
- RC2() : K(64) {}
private:
void key_schedule(const byte[], size_t);