aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/block/cascade/cascade.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/block/cascade/cascade.h')
-rw-r--r--src/lib/block/cascade/cascade.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/lib/block/cascade/cascade.h b/src/lib/block/cascade/cascade.h
index 9b7d44fdf..3634b2f5b 100644
--- a/src/lib/block/cascade/cascade.h
+++ b/src/lib/block/cascade/cascade.h
@@ -9,6 +9,7 @@
#define BOTAN_CASCADE_H__
#include <botan/block_cipher.h>
+#include <memory>
namespace Botan {
@@ -21,12 +22,12 @@ class BOTAN_DLL Cascade_Cipher : public BlockCipher
void encrypt_n(const byte in[], byte out[], size_t blocks) const;
void decrypt_n(const byte in[], byte out[], size_t blocks) const;
- size_t block_size() const { return block; }
+ size_t block_size() const { return m_block; }
Key_Length_Specification key_spec() const
{
- return Key_Length_Specification(cipher1->maximum_keylength() +
- cipher2->maximum_keylength());
+ return Key_Length_Specification(m_cipher1->maximum_keylength() +
+ m_cipher2->maximum_keylength());
}
void clear();
@@ -42,14 +43,11 @@ class BOTAN_DLL Cascade_Cipher : public BlockCipher
Cascade_Cipher(const Cascade_Cipher&) = delete;
Cascade_Cipher& operator=(const Cascade_Cipher&) = delete;
-
- ~Cascade_Cipher();
private:
void key_schedule(const byte[], size_t);
- size_t block;
- BlockCipher* cipher1;
- BlockCipher* cipher2;
+ size_t m_block;
+ std::unique_ptr<BlockCipher> m_cipher1, m_cipher2;
};