aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/xtea
diff options
context:
space:
mode:
Diffstat (limited to 'src/block/xtea')
-rw-r--r--src/block/xtea/xtea.cpp4
-rw-r--r--src/block/xtea/xtea.h8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/block/xtea/xtea.cpp b/src/block/xtea/xtea.cpp
index 597eedd07..b0c976b36 100644
--- a/src/block/xtea/xtea.cpp
+++ b/src/block/xtea/xtea.cpp
@@ -123,7 +123,9 @@ void XTEA::decrypt_n(const byte in[], byte out[], size_t blocks) const
*/
void XTEA::key_schedule(const byte key[], size_t)
{
- SecureVector<u32bit> UK(4);
+ EK.resize(64);
+
+ secure_vector<u32bit> UK(4);
for(size_t i = 0; i != 4; ++i)
UK[i] = load_be<u32bit>(key, i);
diff --git a/src/block/xtea/xtea.h b/src/block/xtea/xtea.h
index 985e9d6d1..1d86bf5ce 100644
--- a/src/block/xtea/xtea.h
+++ b/src/block/xtea/xtea.h
@@ -21,20 +21,18 @@ class BOTAN_DLL XTEA : public Block_Cipher_Fixed_Params<8, 16>
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(EK); }
+ void clear() { EK.clear(); }
std::string name() const { return "XTEA"; }
BlockCipher* clone() const { return new XTEA; }
-
- XTEA() : EK(64) {}
protected:
/**
* @return const reference to the key schedule
*/
- const SecureVector<u32bit>& get_EK() const { return EK; }
+ const secure_vector<u32bit>& get_EK() const { return EK; }
private:
void key_schedule(const byte[], size_t);
- SecureVector<u32bit> EK;
+ secure_vector<u32bit> EK;
};
}