diff options
author | Mike Buland <eichlan@xagasoft.com> | 2012-04-09 16:29:18 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2012-04-09 16:29:18 +0000 |
commit | 228b885b41652a015a91770dfd993456d76ad102 (patch) | |
tree | 9a4b0756133fa1b7553f9aacf9ad50e7f26179d8 /src/experimental/cipher.h | |
parent | b93f18e1dd303fb648bc350416f7f5ace536fd1f (diff) | |
download | libbu++-228b885b41652a015a91770dfd993456d76ad102.tar.gz libbu++-228b885b41652a015a91770dfd993456d76ad102.tar.bz2 libbu++-228b885b41652a015a91770dfd993456d76ad102.tar.xz libbu++-228b885b41652a015a91770dfd993456d76ad102.zip |
Blowfish works in it's new split form, which will make it much easier to add
other types of ciphers down the road, should we choose to.
Diffstat (limited to 'src/experimental/cipher.h')
-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 | ||