diff options
author | lloyd <[email protected]> | 2006-05-18 18:33:19 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2006-05-18 18:33:19 +0000 |
commit | a2c99d3270eb73ef2db5704fc54356c6b75096f8 (patch) | |
tree | ad3d6c4fcc8dd0f403f8105598943616246fe172 /include/gost.h |
Initial checkin1.5.6
Diffstat (limited to 'include/gost.h')
-rw-r--r-- | include/gost.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/include/gost.h b/include/gost.h new file mode 100644 index 000000000..71a472b50 --- /dev/null +++ b/include/gost.h @@ -0,0 +1,35 @@ +/************************************************* +* GOST Header File * +* (C) 1999-2006 The Botan Project * +*************************************************/ + +#ifndef BOTAN_GOST_H__ +#define BOTAN_GOST_H__ + +#include <botan/base.h> + +namespace Botan { + +/************************************************* +* GOST * +*************************************************/ +class GOST : public BlockCipher + { + public: + void clear() throw() { EK.clear(); } + std::string name() const { return "GOST"; } + BlockCipher* clone() const { return new GOST; } + GOST() : BlockCipher(8, 32) {} + private: + void enc(const byte[], byte[]) const; + void dec(const byte[], byte[]) const; + void key(const byte[], u32bit); + + static const u32bit SBOX1[256], SBOX2[256], SBOX3[256], SBOX4[256]; + + SecureBuffer<u32bit, 32> EK; + }; + +} + +#endif |