aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/serpent
diff options
context:
space:
mode:
Diffstat (limited to 'src/block/serpent')
-rw-r--r--src/block/serpent/serpent.cpp5
-rw-r--r--src/block/serpent/serpent.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/block/serpent/serpent.cpp b/src/block/serpent/serpent.cpp
index 0f0a4fd63..8c83b69de 100644
--- a/src/block/serpent/serpent.cpp
+++ b/src/block/serpent/serpent.cpp
@@ -391,4 +391,9 @@ void Serpent::key_schedule(const byte key[], size_t length)
round_key.assign(&W[8], &W[140]);
}
+void Serpent::clear()
+ {
+ zap(round_key);
+ }
+
}
diff --git a/src/block/serpent/serpent.h b/src/block/serpent/serpent.h
index 9266ccef8..dc539c9f3 100644
--- a/src/block/serpent/serpent.h
+++ b/src/block/serpent/serpent.h
@@ -21,7 +21,7 @@ class BOTAN_DLL Serpent : public Block_Cipher_Fixed_Params<16, 16, 32, 8>
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() { round_key.clear(); }
+ void clear();
std::string name() const { return "Serpent"; }
BlockCipher* clone() const { return new Serpent; }
protected: