aboutsummaryrefslogtreecommitdiff
path: root/src/experimental/ciphermodeecb.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-04-10 08:32:23 +0000
committerMike Buland <eichlan@xagasoft.com>2012-04-10 08:32:23 +0000
commitd49fc3aeac4daa65416751f94943b6611ad247d3 (patch)
tree2d843ebe59284d06fea389744a3a08aad423868d /src/experimental/ciphermodeecb.h
parent1e9d8f7a92e43f61e4d9f478f6e8dd5ae206616e (diff)
downloadlibbu++-d49fc3aeac4daa65416751f94943b6611ad247d3.tar.gz
libbu++-d49fc3aeac4daa65416751f94943b6611ad247d3.tar.bz2
libbu++-d49fc3aeac4daa65416751f94943b6611ad247d3.tar.xz
libbu++-d49fc3aeac4daa65416751f94943b6611ad247d3.zip
Rearranged the Cipher system, and added four modes of operation. It's pretty
slick, really, and we actually support four of the most common modes. Blowfish is still a template, but it doesn't really need to be anymore...
Diffstat (limited to '')
-rw-r--r--src/experimental/ciphermodeecb.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/experimental/ciphermodeecb.h b/src/experimental/ciphermodeecb.h
new file mode 100644
index 0000000..006741a
--- /dev/null
+++ b/src/experimental/ciphermodeecb.h
@@ -0,0 +1,32 @@
1#ifndef BU_MODE_ECB_H
2#define BU_MODE_ECB_H
3
4namespace Bu
5{
6 template<int iBlockSize, typename CipherType>
7 class CipherModeEcb : public CipherType
8 {
9 public:
10 CipherModeEcb( class Stream &rNext ) :
11 CipherType( rNext )
12 {
13 }
14
15 virtual ~CipherModeEcb()
16 {
17 }
18
19 protected:
20 virtual void decipher( void *pBuf )
21 {
22 CipherType::decipher( pBuf );
23 }
24
25 virtual void encipher( void *pBuf )
26 {
27 CipherType::encipher( pBuf );
28 }
29 };
30};
31
32#endif