Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

3way.h

Go to the documentation of this file.
00001 #ifndef CRYPTOPP_THREEWAY_H
00002 #define CRYPTOPP_THREEWAY_H
00003 
00007 #include "cryptlib.h"
00008 #include "misc.h"
00009 
00010 NAMESPACE_BEGIN(CryptoPP)
00011 
00013 class ThreeWayEncryption : public FixedBlockSize<12>, public FixedKeyLength<12>
00014 {
00015 public:
00016         enum {DEFAULT_ROUNDS=11};
00017 
00018         ThreeWayEncryption(const byte *userKey, unsigned int = 0, unsigned int rounds=DEFAULT_ROUNDS);
00019         ~ThreeWayEncryption();
00020 
00021         void ProcessBlock(const byte *inBlock, byte * outBlock) const;
00022         void ProcessBlock(byte * inoutBlock) const
00023                 {ThreeWayEncryption::ProcessBlock(inoutBlock, inoutBlock);}
00024 
00025 private:
00026         word32 k[3];
00027         unsigned int rounds;
00028         SecBlock<word32> rc;
00029 };
00030 
00032 class ThreeWayDecryption : public FixedBlockSize<12>, public FixedKeyLength<12>
00033 {
00034 public:
00035         enum {DEFAULT_ROUNDS=11};
00036 
00037         ThreeWayDecryption(const byte *userKey, unsigned int = 0, unsigned int rounds=DEFAULT_ROUNDS);
00038         ~ThreeWayDecryption();
00039 
00040         void ProcessBlock(const byte *inBlock, byte * outBlock) const;
00041         void ProcessBlock(byte * inoutBlock) const
00042                 {ThreeWayDecryption::ProcessBlock(inoutBlock, inoutBlock);}
00043 
00044 private:
00045         word32 k[3];
00046         unsigned int rounds;
00047         SecBlock<word32> rc;
00048 };
00049 
00050 NAMESPACE_END
00051 
00052 #endif

Generated at Mon Jan 15 01:16:28 2001 for Crypto++ by doxygen1.2.4 written by Dimitri van Heesch, © 1997-2000