00001
00002
00003
00004
00005
00006 #ifndef CRYPTOPP_SEED_H
00007 #define CRYPTOPP_SEED_H
00008
00009 #include "seckey.h"
00010 #include "secblock.h"
00011
00012 NAMESPACE_BEGIN(CryptoPP)
00013
00014
00015 struct SEED_Info : public FixedBlockSize<16>, public FixedKeyLength<16>, public FixedRounds<16>
00016 {
00017 static const char *StaticAlgorithmName() {return "SEED";}
00018 };
00019
00020
00021 class SEED : public SEED_Info, public BlockCipherDocumentation
00022 {
00023 class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<SEED_Info>
00024 {
00025 public:
00026 void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs ¶ms);
00027 void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
00028
00029 protected:
00030 FixedSizeSecBlock<word32, 32> m_k;
00031 };
00032
00033 public:
00034 typedef BlockCipherFinal<ENCRYPTION, Base> Encryption;
00035 typedef BlockCipherFinal<DECRYPTION, Base> Decryption;
00036 };
00037
00038 NAMESPACE_END
00039
00040 #endif