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

serpent.h

Go to the documentation of this file.
00001 #ifndef CRYPTOPP_SERPENT_H
00002 #define CRYPTOPP_SERPENT_H
00003 
00007 #include "cryptlib.h"
00008 #include "misc.h"
00009 
00010 NAMESPACE_BEGIN(CryptoPP)
00011 
00013 class Serpent : public FixedBlockSize<16>, public VariableKeyLength<16, 1, 32>
00014 {
00015 protected:
00016         Serpent(const byte *userKey, unsigned int keylength);
00017 
00018         SecBlock<word32> l_key;
00019 };
00020 
00022 class SerpentEncryption : public Serpent
00023 {
00024 public:
00025         SerpentEncryption(const byte *userKey, unsigned int keylength=DEFAULT_KEYLENGTH)
00026                 : Serpent(userKey, keylength) {}
00027 
00028         void ProcessBlock(const byte *inBlock, byte * outBlock) const;
00029         void ProcessBlock(byte * inoutBlock) const
00030                 {SerpentEncryption::ProcessBlock(inoutBlock, inoutBlock);}
00031 };
00032 
00034 class SerpentDecryption : public Serpent
00035 {
00036 public:
00037         SerpentDecryption(const byte *userKey, unsigned int keylength=DEFAULT_KEYLENGTH)
00038                 : Serpent(userKey, keylength) {}
00039 
00040         void ProcessBlock(const byte *inBlock, byte * outBlock) const;
00041         void ProcessBlock(byte * inoutBlock) const
00042                 {SerpentDecryption::ProcessBlock(inoutBlock, inoutBlock);}
00043 };
00044 
00045 NAMESPACE_END
00046 
00047 #endif

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