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

« back to all changes in this revision

Viewing changes to twofish.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 Twofish_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 0, 32>, FixedRounds<16>
13
14
{
14
15
        static const char *StaticAlgorithmName() {return "Twofish";}
17
18
/// <a href="http://www.weidai.com/scan-mirror/cs.html#Twofish">Twofish</a>
18
19
class Twofish : public Twofish_Info, public BlockCipherDocumentation
19
20
{
20
 
        class Base : public BlockCipherBaseTemplate<Twofish_Info>
 
21
        class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<Twofish_Info>
21
22
        {
22
23
        public:
23
24
                void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length);
33
34
                FixedSizeSecBlock<word32[256], 4> m_s;
34
35
        };
35
36
 
36
 
        class Enc : public Base
 
37
        class CRYPTOPP_NO_VTABLE Enc : public Base
37
38
        {
38
39
        public:
39
40
                void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
40
41
        };
41
42
 
42
 
        class Dec : public Base
 
43
        class CRYPTOPP_NO_VTABLE Dec : public Base
43
44
        {
44
45
        public:
45
46
                void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
46
47
        };
47
48
 
48
49
public:
49
 
        typedef BlockCipherTemplate<ENCRYPTION, Enc> Encryption;
50
 
        typedef BlockCipherTemplate<DECRYPTION, Dec> Decryption;
 
50
        typedef BlockCipherFinal<ENCRYPTION, Enc> Encryption;
 
51
        typedef BlockCipherFinal<DECRYPTION, Dec> Decryption;
51
52
};
52
53
 
53
54
typedef Twofish::Encryption TwofishEncryption;