diff options
author | lloyd <[email protected]> | 2008-11-08 19:46:52 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-11-08 19:46:52 +0000 |
commit | f1c459725da56fd8ed5766e7779300182fa26bcf (patch) | |
tree | 32295cec92df1155563ae8a535dc695d6800d7f6 /src/block/rc2/rc2.h | |
parent | 8dba7b5264403e781bbb86ff61850e4377dca7b9 (diff) |
Split ciphers into block and stream ciphers. Move base class headers
Diffstat (limited to 'src/block/rc2/rc2.h')
-rw-r--r-- | src/block/rc2/rc2.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/block/rc2/rc2.h b/src/block/rc2/rc2.h new file mode 100644 index 000000000..ddf5154b8 --- /dev/null +++ b/src/block/rc2/rc2.h @@ -0,0 +1,35 @@ +/************************************************* +* RC2 Header File * +* (C) 1999-2007 Jack Lloyd * +*************************************************/ + +#ifndef BOTAN_RC2_H__ +#define BOTAN_RC2_H__ + +#include <botan/block_cipher.h> + +namespace Botan { + +/************************************************* +* RC2 * +*************************************************/ +class BOTAN_DLL RC2 : public BlockCipher + { + public: + static byte EKB_code(u32bit); + + void clear() throw() { K.clear(); } + std::string name() const { return "RC2"; } + BlockCipher* clone() const { return new RC2; } + RC2() : BlockCipher(8, 1, 32) {} + private: + void enc(const byte[], byte[]) const; + void dec(const byte[], byte[]) const; + void key(const byte[], u32bit); + + SecureBuffer<u16bit, 64> K; + }; + +} + +#endif |