diff options
Diffstat (limited to 'include/modebase.h')
-rw-r--r-- | include/modebase.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/include/modebase.h b/include/modebase.h new file mode 100644 index 000000000..5dce85bca --- /dev/null +++ b/include/modebase.h @@ -0,0 +1,35 @@ +/************************************************* +* Block Cipher Mode Header File * +* (C) 1999-2006 The Botan Project * +*************************************************/ + +#ifndef BOTAN_MODEBASE_H__ +#define BOTAN_MODEBASE_H__ + +#include <botan/basefilt.h> + +namespace Botan { + +/************************************************* +* Block Cipher Mode * +*************************************************/ +class BlockCipherMode : public Keyed_Filter + { + public: + std::string name() const; + + BlockCipherMode(const std::string&, const std::string&, + u32bit, u32bit = 0, u32bit = 1); + virtual ~BlockCipherMode() { delete cipher; } + protected: + void set_iv(const InitializationVector&); + const u32bit BLOCK_SIZE, BUFFER_SIZE, IV_METHOD; + const std::string mode_name; + BlockCipher* cipher; + SecureVector<byte> buffer, state; + u32bit position; + }; + +} + +#endif |