diff options
author | lloyd <[email protected]> | 2006-05-18 18:33:19 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2006-05-18 18:33:19 +0000 |
commit | a2c99d3270eb73ef2db5704fc54356c6b75096f8 (patch) | |
tree | ad3d6c4fcc8dd0f403f8105598943616246fe172 /include/basefilt.h |
Initial checkin1.5.6
Diffstat (limited to 'include/basefilt.h')
-rw-r--r-- | include/basefilt.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/include/basefilt.h b/include/basefilt.h new file mode 100644 index 000000000..0febb3989 --- /dev/null +++ b/include/basefilt.h @@ -0,0 +1,55 @@ +/************************************************* +* Basic Filters Header File * +* (C) 1999-2006 The Botan Project * +*************************************************/ + +#ifndef BOTAN_BASEFILT_H__ +#define BOTAN_BASEFILT_H__ + +#include <botan/filter.h> + +namespace Botan { + +/************************************************* +* Chain * +*************************************************/ +class Chain : public Fanout_Filter + { + public: + void write(const byte input[], u32bit length) { send(input, length); } + + Chain(Filter* = 0, Filter* = 0, Filter* = 0, Filter* = 0); + Chain(Filter*[], u32bit); + }; + +/************************************************* +* Fork * +*************************************************/ +class Fork : public Fanout_Filter + { + public: + void write(const byte input[], u32bit length) { send(input, length); } + void set_port(u32bit n) { Fanout_Filter::set_port(n); } + + Fork(Filter*, Filter*, Filter* = 0, Filter* = 0); + Fork(Filter*[], u32bit); + }; + +/************************************************* +* Keyed Filter * +*************************************************/ +class Keyed_Filter : public Filter + { + public: + virtual void set_key(const SymmetricKey&); + virtual void set_iv(const InitializationVector&) {} + virtual bool valid_keylength(u32bit) const; + + Keyed_Filter() { base_ptr = 0; } + protected: + SymmetricAlgorithm* base_ptr; + }; + +} + +#endif |