aboutsummaryrefslogtreecommitdiffstats
path: root/src/modes/cbc/cbc.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-09-28 19:29:24 +0000
committerlloyd <[email protected]>2008-09-28 19:29:24 +0000
commit9bcfe627321ddc81691b835dffaa6324ac4684a4 (patch)
treefe5e8ae9813b853549558b59833022e87e83981b /src/modes/cbc/cbc.h
parent9822a701516396b7de4e41339faecd48ff8dc8ff (diff)
Move all modules into src/ directory
Diffstat (limited to 'src/modes/cbc/cbc.h')
-rw-r--r--src/modes/cbc/cbc.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/modes/cbc/cbc.h b/src/modes/cbc/cbc.h
new file mode 100644
index 000000000..a0a30f90f
--- /dev/null
+++ b/src/modes/cbc/cbc.h
@@ -0,0 +1,49 @@
+/*************************************************
+* CBC Mode Header File *
+* (C) 1999-2007 Jack Lloyd *
+*************************************************/
+
+#ifndef BOTAN_CBC_H__
+#define BOTAN_CBC_H__
+
+#include <botan/modebase.h>
+#include <botan/mode_pad.h>
+
+namespace Botan {
+
+/*************************************************
+* CBC Encryption *
+*************************************************/
+class BOTAN_DLL CBC_Encryption : public BlockCipherMode
+ {
+ public:
+ CBC_Encryption(const std::string&, const std::string&);
+ CBC_Encryption(const std::string&, const std::string&,
+ const SymmetricKey&, const InitializationVector&);
+ private:
+ std::string name() const;
+ void write(const byte[], u32bit);
+ void end_msg();
+ const BlockCipherModePaddingMethod* padder;
+ };
+
+/*************************************************
+* CBC Decryption *
+*************************************************/
+class BOTAN_DLL CBC_Decryption : public BlockCipherMode
+ {
+ public:
+ CBC_Decryption(const std::string&, const std::string&);
+ CBC_Decryption(const std::string&, const std::string&,
+ const SymmetricKey&, const InitializationVector&);
+ private:
+ std::string name() const;
+ void write(const byte[], u32bit);
+ void end_msg();
+ const BlockCipherModePaddingMethod* padder;
+ SecureVector<byte> temp;
+ };
+
+}
+
+#endif