~zooko/cryptopp/trunk

« back to all changes in this revision

Viewing changes to seed.h

  • Committer: weidai
  • Date: 2009-03-02 02:39:17 UTC
  • Revision ID: svn-v4:57ff6487-cd31-0410-9ec3-f628ee90f5f0:trunk/c5:433
changes for 5.6: 
    - added AuthenticatedSymmetricCipher interface class and Filter wrappers
    - added CCM, GCM (with SSE2 assembly), CMAC, and SEED
    - improved AES speed on x86 and x64
    - removed WORD64_AVAILABLE; compiler 64-bit int support is now required

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef CRYPTOPP_SEED_H
 
2
#define CRYPTOPP_SEED_H
 
3
 
 
4
/** \file
 
5
*/
 
6
 
 
7
#include "seckey.h"
 
8
#include "secblock.h"
 
9
 
 
10
NAMESPACE_BEGIN(CryptoPP)
 
11
 
 
12
//! _
 
13
struct SEED_Info : public FixedBlockSize<16>, public FixedKeyLength<16>, public FixedRounds<16>
 
14
{
 
15
        static const char *StaticAlgorithmName() {return "SEED";}
 
16
};
 
17
 
 
18
/// <a href="http://www.cryptolounge.org/wiki/SEED">SEED</a>
 
19
class SEED : public SEED_Info, public BlockCipherDocumentation
 
20
{
 
21
        class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<SEED_Info>
 
22
        {
 
23
        public:
 
24
                void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs &params);
 
25
                void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
 
26
 
 
27
        protected:
 
28
                FixedSizeSecBlock<word32, 32> m_k;
 
29
        };
 
30
 
 
31
public:
 
32
        typedef BlockCipherFinal<ENCRYPTION, Base> Encryption;
 
33
        typedef BlockCipherFinal<DECRYPTION, Base> Decryption;
 
34
};
 
35
 
 
36
NAMESPACE_END
 
37
 
 
38
#endif