monotone

monotone Mtn Source Tree

Root/botan/basefilt.h

1/*************************************************
2* Basic Filters Header File *
3* (C) 1999-2007 The Botan Project *
4*************************************************/
5
6#ifndef BOTAN_BASEFILT_H__
7#define BOTAN_BASEFILT_H__
8
9#include <botan/filter.h>
10
11namespace Botan {
12
13/*************************************************
14* Chain *
15*************************************************/
16class Chain : public Fanout_Filter
17 {
18 public:
19 void write(const byte input[], u32bit length) { send(input, length); }
20
21 Chain(Filter* = 0, Filter* = 0, Filter* = 0, Filter* = 0);
22 Chain(Filter*[], u32bit);
23 };
24
25/*************************************************
26* Fork *
27*************************************************/
28class Fork : public Fanout_Filter
29 {
30 public:
31 void write(const byte input[], u32bit length) { send(input, length); }
32 void set_port(u32bit n) { Fanout_Filter::set_port(n); }
33
34 Fork(Filter*, Filter*, Filter* = 0, Filter* = 0);
35 Fork(Filter*[], u32bit);
36 };
37
38/*************************************************
39* Keyed Filter *
40*************************************************/
41class Keyed_Filter : public Filter
42 {
43 public:
44 virtual void set_key(const SymmetricKey&);
45 virtual void set_iv(const InitializationVector&) {}
46 virtual bool valid_keylength(u32bit) const;
47
48 Keyed_Filter() { base_ptr = 0; }
49 protected:
50 SymmetricAlgorithm* base_ptr;
51 };
52
53}
54
55#endif

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status