diff options
Diffstat (limited to '')
-rw-r--r-- | src/experimental/cipher.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/experimental/cipher.h b/src/experimental/cipher.h new file mode 100644 index 0000000..2327aa6 --- /dev/null +++ b/src/experimental/cipher.h | |||
@@ -0,0 +1,29 @@ | |||
1 | #ifndef BU_CIPHER_H | ||
2 | #define BU_CIPHER_H | ||
3 | |||
4 | #include "bu/filter.h" | ||
5 | |||
6 | namespace Bu | ||
7 | { | ||
8 | class Cipher : Bu::Filter | ||
9 | { | ||
10 | public: | ||
11 | Cipher( Bu::Stream &rNext ); | ||
12 | virtual ~Cipher(); | ||
13 | |||
14 | virtual void start(); | ||
15 | virtual Bu::size stop(); | ||
16 | |||
17 | virtual Bu::size read( void *pBuf, Bu::size iBytes ); | ||
18 | virtual Bu::size write( const void *pBuf, Bu::size iBytes ); | ||
19 | |||
20 | using Bu::Stream::read; | ||
21 | using Bu::Stream::write; | ||
22 | |||
23 | protected: | ||
24 | virtual void encipher( void *pData )=0; | ||
25 | virtual void decipher( void *pData )=0; | ||
26 | }; | ||
27 | }; | ||
28 | |||
29 | #endif | ||