~ubuntu-branches/ubuntu/intrepid/libcrypto++/intrepid

« back to all changes in this revision

Viewing changes to rc6.h

  • Committer: Bazaar Package Importer
  • Author(s): Pierre Machard
  • Date: 2004-08-27 12:35:05 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040827123505-7evgxiu7k8memiyk
Tags: 5.2.1a-1
* Urgency set to high because lastest upload was unclean
* Rename libcrypto++-5.2.1.orig.tar.gz in  libcrypto++-5.2.1a.orig.tar.gz

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
 
10
10
NAMESPACE_BEGIN(CryptoPP)
11
11
 
 
12
//! _
12
13
struct RC6_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 0, 255>, public VariableRounds<20>
13
14
{
14
15
        static const char *StaticAlgorithmName() {return "RC6";}
18
19
/// <a href="http://www.weidai.com/scan-mirror/cs.html#RC6">RC6</a>
19
20
class RC6 : public RC6_Info, public BlockCipherDocumentation
20
21
{
21
 
        class Base : public BlockCipherBaseTemplate<RC6_Info>
 
22
        class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<RC6_Info>
22
23
        {
23
24
        public:
24
25
                void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length, unsigned int rounds);
28
29
                SecBlock<RC6_WORD> sTable;  // expanded key table
29
30
        };
30
31
 
31
 
        class Enc : public Base
 
32
        class CRYPTOPP_NO_VTABLE Enc : public Base
32
33
        {
33
34
        public:
34
35
                void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
35
36
        };
36
37
 
37
 
        class Dec : public Base
 
38
        class CRYPTOPP_NO_VTABLE Dec : public Base
38
39
        {
39
40
        public:
40
41
                void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
41
42
        };
42
43
 
43
44
public:
44
 
        typedef BlockCipherTemplate<ENCRYPTION, Enc> Encryption;
45
 
        typedef BlockCipherTemplate<DECRYPTION, Dec> Decryption;
 
45
        typedef BlockCipherFinal<ENCRYPTION, Enc> Encryption;
 
46
        typedef BlockCipherFinal<DECRYPTION, Dec> Decryption;
46
47
};
47
48
 
48
49
typedef RC6::Encryption RC6Encryption;