From a003ea18cc73995fef6479896a98389812298893 Mon Sep 17 00:00:00 2001 From: weidai Date: Fri, 16 May 2003 00:53:53 +0000 Subject: [PATCH] add CRYPTOPP_NO_VTABLE --- 3way.h | 6 +++--- algebra.h | 6 +++--- arc4.h | 8 ++++---- blowfish.h | 2 +- camellia.h | 2 +- cast.h | 8 ++++---- cbcmac.h | 2 +- des.h | 8 ++++---- diamond.h | 12 ++++++------ dmac.h | 2 +- elgamal.h | 8 ++++---- filters.h | 4 ++-- gfpcrypt.h | 4 ++-- gost.h | 6 +++--- hmac.h | 2 +- idea.h | 2 +- iterhash.h | 8 ++++---- lubyrack.h | 6 +++--- mars.h | 6 +++--- md5mac.h | 2 +- mdc.h | 2 +- modes.h | 24 ++++++++++++------------ network.h | 12 ++++++------ panama.h | 4 ++-- rc2.h | 6 +++--- rc5.h | 6 +++--- rc6.h | 6 +++--- rijndael.h | 6 +++--- safer.h | 14 +++++++------- seal.h | 2 +- seckey.h | 4 ++-- serpent.h | 6 +++--- shacal2.h | 6 +++--- shark.h | 6 +++--- simple.h | 20 ++++++++++---------- skipjack.h | 6 +++--- square.h | 6 +++--- strciphr.h | 18 +++++++++--------- tea.h | 6 +++--- ttmac.h | 2 +- twofish.h | 6 +++--- wake.h | 4 ++-- xormac.h | 2 +- 43 files changed, 139 insertions(+), 139 deletions(-) diff --git a/3way.h b/3way.h index 398848d1..2192eb40 100644 --- a/3way.h +++ b/3way.h @@ -17,7 +17,7 @@ struct ThreeWay_Info : public FixedBlockSize<12>, public FixedKeyLength<12>, pub /// 3-Way class ThreeWay : public ThreeWay_Info, public BlockCipherDocumentation { - class Base : public BlockCipherBaseTemplate + class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate { public: void UncheckedSetKey(CipherDir direction, const byte *key, unsigned int length, unsigned int rounds); @@ -27,13 +27,13 @@ class ThreeWay : public ThreeWay_Info, public BlockCipherDocumentation FixedSizeSecBlock m_k; }; - class Enc : public Base + class CRYPTOPP_NO_VTABLE Enc : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; }; - class Dec : public Base + class CRYPTOPP_NO_VTABLE Dec : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; diff --git a/algebra.h b/algebra.h index bb36e59b..a9c677ec 100644 --- a/algebra.h +++ b/algebra.h @@ -16,7 +16,7 @@ class Integer; // abcd = group.Add(a, group.Add(b, group.Add(c,d)); //! Abstract Group -template class AbstractGroup +template class CRYPTOPP_NO_VTABLE AbstractGroup { public: typedef T Element; @@ -41,7 +41,7 @@ public: }; //! Abstract Ring -template class AbstractRing : public AbstractGroup +template class CRYPTOPP_NO_VTABLE AbstractRing : public AbstractGroup { public: typedef T Element; @@ -135,7 +135,7 @@ template // ******************************************************** //! Abstract Euclidean Domain -template class AbstractEuclideanDomain : public AbstractRing +template class CRYPTOPP_NO_VTABLE AbstractEuclideanDomain : public AbstractRing { public: typedef T Element; diff --git a/arc4.h b/arc4.h index cfb7de69..7d592bae 100644 --- a/arc4.h +++ b/arc4.h @@ -6,8 +6,8 @@ NAMESPACE_BEGIN(CryptoPP) //! Alleged RC4 -/*! You can #ARC4 typedef rather than this class directly. */ -class ARC4_Base : public VariableKeyLength<16, 1, 256>, public RandomNumberGenerator, public SymmetricCipher +/*! Use #ARC4 typedef rather than this class directly. */ +class CRYPTOPP_NO_VTABLE ARC4_Base : public VariableKeyLength<16, 1, 256>, public RandomNumberGenerator, public SymmetricCipher { public: ~ARC4_Base(); @@ -38,8 +38,8 @@ protected: typedef SymmetricCipherFinalTemplate ARC4; //! Modified ARC4: it discards the first 256 bytes of keystream which may be weaker than the rest -/*! You can #MARC4 typedef rather than this class directly. */ -class MARC4_Base : public ARC4_Base +/*! Use #MARC4 typedef rather than this class directly. */ +class CRYPTOPP_NO_VTABLE MARC4_Base : public ARC4_Base { public: static const char *StaticAlgorithmName() {return "MARC4";} diff --git a/blowfish.h b/blowfish.h index 1ca2c20d..dc45a5f7 100644 --- a/blowfish.h +++ b/blowfish.h @@ -16,7 +16,7 @@ struct Blowfish_Info : public FixedBlockSize<8>, public VariableKeyLength<16, 1, //! Blowfish class Blowfish : public Blowfish_Info, public BlockCipherDocumentation { - class Base : public BlockCipherBaseTemplate + class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; diff --git a/camellia.h b/camellia.h index 8e15c119..1b43e1de 100644 --- a/camellia.h +++ b/camellia.h @@ -21,7 +21,7 @@ struct Camellia_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 1 /// Camellia class Camellia : public Camellia_Info, public BlockCipherDocumentation { - class Base : public BlockCipherBaseTemplate + class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate { public: void UncheckedSetKey(CipherDir dir, const byte *key, unsigned int keylen); diff --git a/cast.h b/cast.h index 8a2e1124..af66d005 100644 --- a/cast.h +++ b/cast.h @@ -24,7 +24,7 @@ struct CAST128_Info : public FixedBlockSize<8>, public VariableKeyLength<16, 5, /// CAST-128 class CAST128 : public CAST128_Info, public BlockCipherDocumentation { - class Base : public CAST, public BlockCipherBaseTemplate + class CRYPTOPP_NO_VTABLE Base : public CAST, public BlockCipherBaseTemplate { public: void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length); @@ -34,13 +34,13 @@ class CAST128 : public CAST128_Info, public BlockCipherDocumentation FixedSizeSecBlock K; }; - class Enc : public Base + class CRYPTOPP_NO_VTABLE Enc : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; }; - class Dec : public Base + class CRYPTOPP_NO_VTABLE Dec : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; @@ -60,7 +60,7 @@ struct CAST256_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 16 //! CAST-256 class CAST256 : public CAST256_Info, public BlockCipherDocumentation { - class Base : public CAST, public BlockCipherBaseTemplate + class CRYPTOPP_NO_VTABLE Base : public CAST, public BlockCipherBaseTemplate { public: void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length = 8); diff --git a/cbcmac.h b/cbcmac.h index 0297f9dc..7f88e912 100644 --- a/cbcmac.h +++ b/cbcmac.h @@ -7,7 +7,7 @@ NAMESPACE_BEGIN(CryptoPP) template -class CBC_MAC_Base : public SameKeyLengthAs, public MessageAuthenticationCode +class CRYPTOPP_NO_VTABLE CBC_MAC_Base : public SameKeyLengthAs, public MessageAuthenticationCode { public: static std::string StaticAlgorithmName() {return std::string("CBC-MAC(") + T::StaticAlgorithmName() + ")";} diff --git a/des.h b/des.h index 65b4d33b..5a7f2dfe 100644 --- a/des.h +++ b/des.h @@ -21,7 +21,7 @@ struct DES_Info : public FixedBlockSize<8>, public FixedKeyLength<8> check or correct the parity bits if you wish. */ class DES : public DES_Info, public BlockCipherDocumentation { - class Base : public BlockCipherBaseTemplate + class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate { public: void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length = 8); @@ -54,7 +54,7 @@ struct DES_EDE2_Info : public FixedBlockSize<8>, public FixedKeyLength<16> /// DES-EDE2 class DES_EDE2 : public DES_EDE2_Info, public BlockCipherDocumentation { - class Base : public BlockCipherBaseTemplate + class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate { public: void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length); @@ -77,7 +77,7 @@ struct DES_EDE3_Info : public FixedBlockSize<8>, public FixedKeyLength<24> /// DES-EDE3 class DES_EDE3 : public DES_EDE3_Info, public BlockCipherDocumentation { - class Base : public BlockCipherBaseTemplate + class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate { public: void UncheckedSetKey(CipherDir dir, const byte *key, unsigned int length); @@ -100,7 +100,7 @@ struct DES_XEX3_Info : public FixedBlockSize<8>, public FixedKeyLength<24> /// DES-XEX3, AKA DESX class DES_XEX3 : public DES_XEX3_Info, public BlockCipherDocumentation { - class Base : public BlockCipherBaseTemplate + class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate { public: void UncheckedSetKey(CipherDir dir, const byte *key, unsigned int length); diff --git a/diamond.h b/diamond.h index 1aae6965..4646b460 100644 --- a/diamond.h +++ b/diamond.h @@ -17,7 +17,7 @@ struct Diamond2_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 1 /// Diamond2 class Diamond2 : public Diamond2_Info, public BlockCipherDocumentation { - class Base : public BlockCipherBaseTemplate + class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate { public: void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length, unsigned int rounds); @@ -37,13 +37,13 @@ class Diamond2 : public Diamond2_Info, public BlockCipherDocumentation #endif }; - class Enc : public Base + class CRYPTOPP_NO_VTABLE Enc : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; }; - class Dec : public Base + class CRYPTOPP_NO_VTABLE Dec : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; @@ -65,7 +65,7 @@ struct Diamond2Lite_Info : public FixedBlockSize<8>, public VariableKeyLength<16 /// Diamond2Lite class Diamond2Lite : public Diamond2Lite_Info, public BlockCipherDocumentation { - class Base : public BlockCipherBaseTemplate + class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate { public: void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length, unsigned int rounds); @@ -84,13 +84,13 @@ class Diamond2Lite : public Diamond2Lite_Info, public BlockCipherDocumentation #endif }; - class Enc : public Base + class CRYPTOPP_NO_VTABLE Enc : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; }; - class Dec : public Base + class CRYPTOPP_NO_VTABLE Dec : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; diff --git a/dmac.h b/dmac.h index dd5d3cb2..e431c447 100644 --- a/dmac.h +++ b/dmac.h @@ -6,7 +6,7 @@ NAMESPACE_BEGIN(CryptoPP) template -class DMAC_Base : public SameKeyLengthAs, public MessageAuthenticationCode +class CRYPTOPP_NO_VTABLE DMAC_Base : public SameKeyLengthAs, public MessageAuthenticationCode { public: static std::string StaticAlgorithmName() {return std::string("DMAC(") + T::StaticAlgorithmName() + ")";} diff --git a/elgamal.h b/elgamal.h index 65446c59..6835784e 100644 --- a/elgamal.h +++ b/elgamal.h @@ -6,7 +6,7 @@ NAMESPACE_BEGIN(CryptoPP) -class ElGamalBase : public DL_KeyAgreementAlgorithm_DH, +class CRYPTOPP_NO_VTABLE ElGamalBase : public DL_KeyAgreementAlgorithm_DH, public DL_KeyDerivationAlgorithm, public DL_SymmetricEncryptionAlgorithm { @@ -75,7 +75,7 @@ public: }; template -class ElGamalObjectImpl : public DL_ObjectImplBase, public ElGamalBase +class CRYPTOPP_NO_VTABLE ElGamalObjectImpl : public DL_ObjectImplBase, public ElGamalBase { public: unsigned int FixedMaxPlaintextLength() const {return MaxPlaintextLength(FixedCiphertextLength());} @@ -106,14 +106,14 @@ struct ElGamal static const char * StaticAlgorithmName() {return "ElgamalEnc/Crypto++Padding";} - class EncryptorImpl : public ElGamalObjectImpl, SchemeOptions, SchemeOptions::PublicKey>, public PublicKeyCopier + class CRYPTOPP_NO_VTABLE EncryptorImpl : public ElGamalObjectImpl, SchemeOptions, SchemeOptions::PublicKey>, public PublicKeyCopier { public: void CopyKeyInto(SchemeOptions::PublicKey &key) const {key = GetKey();} }; - class DecryptorImpl : public ElGamalObjectImpl, SchemeOptions, SchemeOptions::PrivateKey>, public PrivateKeyCopier + class CRYPTOPP_NO_VTABLE DecryptorImpl : public ElGamalObjectImpl, SchemeOptions, SchemeOptions::PrivateKey>, public PrivateKeyCopier { public: void CopyKeyInto(SchemeOptions::PublicKey &key) const diff --git a/filters.h b/filters.h index 85666574..22994c95 100644 --- a/filters.h +++ b/filters.h @@ -11,7 +11,7 @@ NAMESPACE_BEGIN(CryptoPP) /// provides an implementation of BufferedTransformation's attachment interface -class Filter : public BufferedTransformation, public NotCopyable +class CRYPTOPP_NO_VTABLE Filter : public BufferedTransformation, public NotCopyable { public: Filter(BufferedTransformation *attachment); @@ -621,7 +621,7 @@ private: }; //! A Filter that pumps data into its attachment as input -class Source : public InputRejecting +class CRYPTOPP_NO_VTABLE Source : public InputRejecting { public: Source(BufferedTransformation *attachment) diff --git a/gfpcrypt.h b/gfpcrypt.h index 24c8168b..5cf2492d 100644 --- a/gfpcrypt.h +++ b/gfpcrypt.h @@ -18,7 +18,7 @@ NAMESPACE_BEGIN(CryptoPP) //! . -class DL_GroupParameters_IntegerBased : public DL_GroupParameters, public ASN1CryptoMaterial +class CRYPTOPP_NO_VTABLE DL_GroupParameters_IntegerBased : public DL_GroupParameters, public ASN1CryptoMaterial { typedef DL_GroupParameters_IntegerBased ThisClass; @@ -78,7 +78,7 @@ private: //! . template > -class DL_GroupParameters_IntegerBasedImpl : public DL_GroupParametersImpl +class CRYPTOPP_NO_VTABLE DL_GroupParameters_IntegerBasedImpl : public DL_GroupParametersImpl { typedef DL_GroupParameters_IntegerBasedImpl ThisClass; diff --git a/gost.h b/gost.h index 332f36a2..b8f5b1e3 100644 --- a/gost.h +++ b/gost.h @@ -17,7 +17,7 @@ struct GOST_Info : public FixedBlockSize<8>, public FixedKeyLength<32> /// GOST class GOST : public GOST_Info, public BlockCipherDocumentation { - class Base : public BlockCipherBaseTemplate + class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate { public: void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length); @@ -32,13 +32,13 @@ class GOST : public GOST_Info, public BlockCipherDocumentation FixedSizeSecBlock key; }; - class Enc : public Base + class CRYPTOPP_NO_VTABLE Enc : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; }; - class Dec : public Base + class CRYPTOPP_NO_VTABLE Dec : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; diff --git a/hmac.h b/hmac.h index 4bda7e22..44a5a8ae 100644 --- a/hmac.h +++ b/hmac.h @@ -9,7 +9,7 @@ NAMESPACE_BEGIN(CryptoPP) template -class HMAC_Base : public VariableKeyLength<16, 0, UINT_MAX>, public MessageAuthenticationCode +class CRYPTOPP_NO_VTABLE HMAC_Base : public VariableKeyLength<16, 0, UINT_MAX>, public MessageAuthenticationCode { public: static std::string StaticAlgorithmName() {return std::string("HMAC(") + T::StaticAlgorithmName() + ")";} diff --git a/idea.h b/idea.h index 0f9bbce0..09624caa 100644 --- a/idea.h +++ b/idea.h @@ -17,7 +17,7 @@ struct IDEA_Info : public FixedBlockSize<8>, public FixedKeyLength<16>, public F /// IDEA class IDEA : public IDEA_Info, public BlockCipherDocumentation { - class Base : public BlockCipherBaseTemplate + class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate { public: unsigned int GetAlignment() const {return 2;} diff --git a/iterhash.h b/iterhash.h index 7945cec6..362379e7 100644 --- a/iterhash.h +++ b/iterhash.h @@ -8,7 +8,7 @@ NAMESPACE_BEGIN(CryptoPP) template -class IteratedHashBase : public BASE +class CRYPTOPP_NO_VTABLE IteratedHashBase : public BASE { public: typedef T HashWordType; @@ -40,7 +40,7 @@ private: //! . template -class IteratedHashBase2 : public IteratedHashBase +class CRYPTOPP_NO_VTABLE IteratedHashBase2 : public IteratedHashBase { public: IteratedHashBase2(unsigned int blockSize, unsigned int digestSize) @@ -64,7 +64,7 @@ protected: //! . template -class IteratedHash : public IteratedHashBase2 +class CRYPTOPP_NO_VTABLE IteratedHash : public IteratedHashBase2 { public: enum {BLOCKSIZE = S}; @@ -78,7 +78,7 @@ protected: }; template -class IteratedHashWithStaticTransform : public IteratedHash +class CRYPTOPP_NO_VTABLE IteratedHashWithStaticTransform : public IteratedHash { protected: IteratedHashWithStaticTransform(unsigned int digestSize) : IteratedHash(digestSize) {} diff --git a/lubyrack.h b/lubyrack.h index 6228b296..9c0d55a1 100644 --- a/lubyrack.h +++ b/lubyrack.h @@ -23,7 +23,7 @@ struct LR_Info : public VariableKeyLength<16, 0, 2*(UINT_MAX/2), 2>, public Fixe template class LR : public LR_Info, public BlockCipherDocumentation { - class Base : public BlockCipherBaseTemplate > + class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate > { public: // VC60 workaround: have to define these functions within class definition @@ -46,7 +46,7 @@ class LR : public LR_Info, public BlockCipherDocumentation mutable SecByteBlock buffer, digest; }; - class Enc : public Base + class CRYPTOPP_NO_VTABLE Enc : public Base { public: @@ -88,7 +88,7 @@ class LR : public LR_Info, public BlockCipherDocumentation } }; - class Dec : public Base + class CRYPTOPP_NO_VTABLE Dec : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const diff --git a/mars.h b/mars.h index 216794c2..674c7b41 100644 --- a/mars.h +++ b/mars.h @@ -17,7 +17,7 @@ struct MARS_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 16, 5 /// MARS class MARS : public MARS_Info, public BlockCipherDocumentation { - class Base : public BlockCipherBaseTemplate + class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate { public: void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length); @@ -28,13 +28,13 @@ class MARS : public MARS_Info, public BlockCipherDocumentation FixedSizeSecBlock EK; }; - class Enc : public Base + class CRYPTOPP_NO_VTABLE Enc : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; }; - class Dec : public Base + class CRYPTOPP_NO_VTABLE Dec : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; diff --git a/md5mac.h b/md5mac.h index e335145c..2a599601 100644 --- a/md5mac.h +++ b/md5mac.h @@ -10,7 +10,7 @@ NAMESPACE_BEGIN(CryptoPP) //! . -class MD5MAC_Base : public FixedKeyLength<16>, public IteratedHash +class CRYPTOPP_NO_VTABLE MD5MAC_Base : public FixedKeyLength<16>, public IteratedHash { public: static std::string StaticAlgorithmName() {return "MD5-MAC";} diff --git a/mdc.h b/mdc.h index 8c76aafd..ff043602 100644 --- a/mdc.h +++ b/mdc.h @@ -22,7 +22,7 @@ struct MDC_Info : public FixedBlockSize, public FixedKeyLength class MDC : public MDC_Info { - class Enc : public BlockCipherBaseTemplate > + class CRYPTOPP_NO_VTABLE Enc : public BlockCipherBaseTemplate > { typedef typename T::HashWordType HashWordType; diff --git a/modes.h b/modes.h index 9a94f379..4dd1437a 100644 --- a/modes.h +++ b/modes.h @@ -28,7 +28,7 @@ struct CipherModeDocumentation : public SymmetricCipherDocumentation { }; -class CipherModeBase : public SymmetricCipher +class CRYPTOPP_NO_VTABLE CipherModeBase : public SymmetricCipher { public: unsigned int MinKeyLength() const {return m_cipher->MinKeyLength();} @@ -63,7 +63,7 @@ protected: }; template -class ModePolicyCommonTemplate : public CipherModeBase, public POLICY_INTERFACE +class CRYPTOPP_NO_VTABLE ModePolicyCommonTemplate : public CipherModeBase, public POLICY_INTERFACE { unsigned int GetAlignment() const {return m_cipher->BlockAlignment();} void CipherSetKey(const NameValuePairs ¶ms, const byte *key, unsigned int length) @@ -75,7 +75,7 @@ class ModePolicyCommonTemplate : public CipherModeBase, public POLICY_INTERFACE } }; -class CFB_ModePolicy : public ModePolicyCommonTemplate +class CRYPTOPP_NO_VTABLE CFB_ModePolicy : public ModePolicyCommonTemplate { public: IV_Requirement IVRequirement() const {return RANDOM_IV;} @@ -118,7 +118,7 @@ inline void CopyOrZero(void *dest, const void *src, size_t s) memset(dest, 0, s); } -class OFB_ModePolicy : public ModePolicyCommonTemplate +class CRYPTOPP_NO_VTABLE OFB_ModePolicy : public ModePolicyCommonTemplate { unsigned int GetBytesPerIteration() const {return BlockSize();} unsigned int GetIterationsToBuffer() const {return 1;} @@ -135,7 +135,7 @@ class OFB_ModePolicy : public ModePolicyCommonTemplate +class CRYPTOPP_NO_VTABLE CTR_ModePolicy : public ModePolicyCommonTemplate { unsigned int GetBytesPerIteration() const {return BlockSize();} unsigned int GetIterationsToBuffer() const {return m_cipher->OptimalNumberOfParallelBlocks();} @@ -153,7 +153,7 @@ class CTR_ModePolicy : public ModePolicyCommonTemplateProcessAndXorMultipleBlocks(inString, NULL, outString, numberOfBlocks);} }; -class CBC_ModeBase : public BlockOrientedCipherModeBase +class CRYPTOPP_NO_VTABLE CBC_ModeBase : public BlockOrientedCipherModeBase { public: IV_Requirement IVRequirement() const {return UNPREDICTABLE_RANDOM_IV;} @@ -193,13 +193,13 @@ public: unsigned int MinLastBlockSize() const {return 0;} }; -class CBC_Encryption : public CBC_ModeBase +class CRYPTOPP_NO_VTABLE CBC_Encryption : public CBC_ModeBase { public: void ProcessBlocks(byte *outString, const byte *inString, unsigned int numberOfBlocks); }; -class CBC_CTS_Encryption : public CBC_Encryption +class CRYPTOPP_NO_VTABLE CBC_CTS_Encryption : public CBC_Encryption { public: void SetStolenIV(byte *iv) {m_stolenIV = iv;} @@ -216,7 +216,7 @@ protected: byte *m_stolenIV; }; -class CBC_Decryption : public CBC_ModeBase +class CRYPTOPP_NO_VTABLE CBC_Decryption : public CBC_ModeBase { public: void ProcessBlocks(byte *outString, const byte *inString, unsigned int numberOfBlocks); @@ -230,7 +230,7 @@ protected: SecByteBlock m_temp; }; -class CBC_CTS_Decryption : public CBC_Decryption +class CRYPTOPP_NO_VTABLE CBC_CTS_Decryption : public CBC_Decryption { public: unsigned int MinLastBlockSize() const {return BlockSize()+1;} diff --git a/network.h b/network.h index 8679a286..e2ec59a6 100644 --- a/network.h +++ b/network.h @@ -7,7 +7,7 @@ NAMESPACE_BEGIN(CryptoPP) //! a Source class that can pump from a device for a specified amount of time. -class NonblockingSource : public AutoSignaling +class CRYPTOPP_NO_VTABLE NonblockingSource : public AutoSignaling { public: NonblockingSource(BufferedTransformation *attachment) @@ -40,7 +40,7 @@ private: }; //! Network Receiver -class NetworkReceiver : public Waitable +class CRYPTOPP_NO_VTABLE NetworkReceiver : public Waitable { public: virtual bool MustWaitToReceive() {return false;} @@ -51,7 +51,7 @@ public: }; //! a Sink class that queues input and can flush to a device for a specified amount of time. -class NonblockingSink : public Sink +class CRYPTOPP_NO_VTABLE NonblockingSink : public Sink { public: bool IsolatedFlush(bool hardFlush, bool blocking); @@ -76,7 +76,7 @@ public: }; //! Network Sender -class NetworkSender : public Waitable +class CRYPTOPP_NO_VTABLE NetworkSender : public Waitable { public: virtual bool MustWaitToSend() {return false;} @@ -89,7 +89,7 @@ public: #ifdef HIGHRES_TIMER_AVAILABLE //! Network Source -class NetworkSource : public NonblockingSource +class CRYPTOPP_NO_VTABLE NetworkSource : public NonblockingSource { public: NetworkSource(BufferedTransformation *attachment); @@ -113,7 +113,7 @@ private: }; //! Network Sink -class NetworkSink : public NonblockingSink +class CRYPTOPP_NO_VTABLE NetworkSink : public NonblockingSink { public: NetworkSink(unsigned int maxBufferSize, bool autoFlush) diff --git a/panama.h b/panama.h index 30b6390c..d18ba495 100644 --- a/panama.h +++ b/panama.h @@ -10,7 +10,7 @@ NAMESPACE_BEGIN(CryptoPP) /// base class, do not use directly template -class Panama +class CRYPTOPP_NO_VTABLE Panama { public: void Reset(); @@ -42,7 +42,7 @@ protected: //! . template -class PanamaMAC_Base : public PanamaHash, public VariableKeyLength<32, 0, UINT_MAX>, public MessageAuthenticationCode +class CRYPTOPP_NO_VTABLE PanamaMAC_Base : public PanamaHash, public VariableKeyLength<32, 0, UINT_MAX>, public MessageAuthenticationCode { public: void UncheckedSetKey(const byte *userKey, unsigned int keylength) diff --git a/rc2.h b/rc2.h index b98ad4b3..963f17cc 100644 --- a/rc2.h +++ b/rc2.h @@ -18,7 +18,7 @@ struct RC2_Info : public FixedBlockSize<8>, public VariableKeyLength<16, 1, 128> /// RC2 class RC2 : public RC2_Info, public BlockCipherDocumentation { - class Base : public BlockCipherBaseTemplate + class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate { public: void UncheckedSetKey(CipherDir direction, const byte *key, unsigned int length, unsigned int effectiveKeyLength); @@ -36,13 +36,13 @@ class RC2 : public RC2_Info, public BlockCipherDocumentation FixedSizeSecBlock K; // expanded key table }; - class Enc : public Base + class CRYPTOPP_NO_VTABLE Enc : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; }; - class Dec : public Base + class CRYPTOPP_NO_VTABLE Dec : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; diff --git a/rc5.h b/rc5.h index 81f87956..c28c629a 100644 --- a/rc5.h +++ b/rc5.h @@ -18,7 +18,7 @@ struct RC5_Info : public FixedBlockSize<8>, public VariableKeyLength<16, 0, 255> /// RC5 class RC5 : public RC5_Info, public BlockCipherDocumentation { - class Base : public BlockCipherBaseTemplate + class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate { public: void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length, unsigned int rounds); @@ -28,13 +28,13 @@ class RC5 : public RC5_Info, public BlockCipherDocumentation SecBlock sTable; // expanded key table }; - class Enc : public Base + class CRYPTOPP_NO_VTABLE Enc : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; }; - class Dec : public Base + class CRYPTOPP_NO_VTABLE Dec : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; diff --git a/rc6.h b/rc6.h index bbaacc9e..9fc14f19 100644 --- a/rc6.h +++ b/rc6.h @@ -18,7 +18,7 @@ struct RC6_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 0, 255 /// RC6 class RC6 : public RC6_Info, public BlockCipherDocumentation { - class Base : public BlockCipherBaseTemplate + class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate { public: void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length, unsigned int rounds); @@ -28,13 +28,13 @@ class RC6 : public RC6_Info, public BlockCipherDocumentation SecBlock sTable; // expanded key table }; - class Enc : public Base + class CRYPTOPP_NO_VTABLE Enc : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; }; - class Dec : public Base + class CRYPTOPP_NO_VTABLE Dec : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; diff --git a/rijndael.h b/rijndael.h index 1c046db4..a1540481 100644 --- a/rijndael.h +++ b/rijndael.h @@ -17,7 +17,7 @@ struct Rijndael_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 1 /// Rijndael class Rijndael : public Rijndael_Info, public BlockCipherDocumentation { - class Base : public BlockCipherBaseTemplate + class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate { public: void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length); @@ -41,13 +41,13 @@ class Rijndael : public Rijndael_Info, public BlockCipherDocumentation SecBlock m_key; }; - class Enc : public Base + class CRYPTOPP_NO_VTABLE Enc : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; }; - class Dec : public Base + class CRYPTOPP_NO_VTABLE Dec : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; diff --git a/safer.h b/safer.h index 4f0621e6..943c1cec 100644 --- a/safer.h +++ b/safer.h @@ -13,7 +13,7 @@ NAMESPACE_BEGIN(CryptoPP) class SAFER { public: - class Base : public BlockCipher + class CRYPTOPP_NO_VTABLE Base : public BlockCipher { public: unsigned int GetAlignment() const {return 1;} @@ -25,13 +25,13 @@ public: static const byte log_tab[256]; }; - class Enc : public Base + class CRYPTOPP_NO_VTABLE Enc : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; }; - class Dec : public Base + class CRYPTOPP_NO_VTABLE Dec : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; @@ -47,13 +47,13 @@ struct SAFER_K_Info : public FixedBlockSize<8>, public VariableKeyLength<16, 8, /// SAFER-K class SAFER_K : public SAFER_K_Info, public SAFER, public BlockCipherDocumentation { - class Enc : public BlockCipherBaseTemplate + class CRYPTOPP_NO_VTABLE Enc : public BlockCipherBaseTemplate { public: Enc() {strengthened = false;} }; - class Dec : public BlockCipherBaseTemplate + class CRYPTOPP_NO_VTABLE Dec : public BlockCipherBaseTemplate { public: Dec() {strengthened = false;} @@ -73,13 +73,13 @@ struct SAFER_SK_Info : public FixedBlockSize<8>, public VariableKeyLength<16, 8, /// SAFER-SK class SAFER_SK : public SAFER_SK_Info, public SAFER, public BlockCipherDocumentation { - class Enc : public BlockCipherBaseTemplate + class CRYPTOPP_NO_VTABLE Enc : public BlockCipherBaseTemplate { public: Enc() {strengthened = true;} }; - class Dec : public BlockCipherBaseTemplate + class CRYPTOPP_NO_VTABLE Dec : public BlockCipherBaseTemplate { public: Dec() {strengthened = true;} diff --git a/seal.h b/seal.h index 4fc7e887..42b6ec16 100644 --- a/seal.h +++ b/seal.h @@ -12,7 +12,7 @@ struct SEAL_Info : public FixedKeyLength<20, SimpleKeyingInterface::INTERNALLY_G }; template -class SEAL_Policy : public AdditiveCipherConcretePolicy, public SEAL_Info +class CRYPTOPP_NO_VTABLE SEAL_Policy : public AdditiveCipherConcretePolicy, public SEAL_Info { public: unsigned int IVSize() const {return 4;} diff --git a/seckey.h b/seckey.h index 36ecd36a..0b173459 100644 --- a/seckey.h +++ b/seckey.h @@ -139,7 +139,7 @@ static inline void CheckedSetKey(T *obj, CipherDir dir, const byte *key, unsigne //! . template -class SimpleKeyingInterfaceImpl : public BASE +class CRYPTOPP_NO_VTABLE SimpleKeyingInterfaceImpl : public BASE { public: unsigned int MinKeyLength() const {return INFO::MIN_KEYLENGTH;} @@ -153,7 +153,7 @@ protected: }; template -class BlockCipherBaseTemplate : public AlgorithmImpl > > +class CRYPTOPP_NO_VTABLE BlockCipherBaseTemplate : public AlgorithmImpl > > { public: unsigned int BlockSize() const {return BLOCKSIZE;} diff --git a/serpent.h b/serpent.h index bc3ac7ac..6bc2f89d 100644 --- a/serpent.h +++ b/serpent.h @@ -17,7 +17,7 @@ struct Serpent_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 1, /// Serpent class Serpent : public Serpent_Info, public BlockCipherDocumentation { - class Base : public BlockCipherBaseTemplate + class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate { public: void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length); @@ -26,13 +26,13 @@ class Serpent : public Serpent_Info, public BlockCipherDocumentation FixedSizeSecBlock m_key; }; - class Enc : public Base + class CRYPTOPP_NO_VTABLE Enc : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; }; - class Dec : public Base + class CRYPTOPP_NO_VTABLE Dec : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; diff --git a/shacal2.h b/shacal2.h index 8208760e..fedbe79f 100644 --- a/shacal2.h +++ b/shacal2.h @@ -17,7 +17,7 @@ struct SHACAL2_Info : public FixedBlockSize<32>, public VariableKeyLength<16, 16 /// SHACAL-2 class SHACAL2 : public SHACAL2_Info, public BlockCipherDocumentation { - class Base : public BlockCipherBaseTemplate + class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate { public: void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length); @@ -28,13 +28,13 @@ class SHACAL2 : public SHACAL2_Info, public BlockCipherDocumentation static const word32 K[64]; }; - class Enc : public Base + class CRYPTOPP_NO_VTABLE Enc : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; }; - class Dec : public Base + class CRYPTOPP_NO_VTABLE Dec : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; diff --git a/shark.h b/shark.h index 001441a0..f67de109 100644 --- a/shark.h +++ b/shark.h @@ -21,7 +21,7 @@ struct SHARK_Info : public FixedBlockSize<8>, public VariableKeyLength<16, 1, 16 /// SHARK-E class SHARK : public SHARK_Info, public BlockCipherDocumentation { - class Base : public BlockCipherBaseTemplate + class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate { public: void UncheckedSetKey(CipherDir dir, const byte *key, unsigned int length, unsigned int rounds); @@ -31,7 +31,7 @@ class SHARK : public SHARK_Info, public BlockCipherDocumentation SecBlock m_roundKeys; }; - class Enc : public Base + class CRYPTOPP_NO_VTABLE Enc : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; @@ -44,7 +44,7 @@ class SHARK : public SHARK_Info, public BlockCipherDocumentation static const word64 cbox[8][256]; }; - class Dec : public Base + class CRYPTOPP_NO_VTABLE Dec : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; diff --git a/simple.h b/simple.h index e26cefd4..99bc0906 100644 --- a/simple.h +++ b/simple.h @@ -12,7 +12,7 @@ NAMESPACE_BEGIN(CryptoPP) template -class AlgorithmImpl : public BASE +class CRYPTOPP_NO_VTABLE AlgorithmImpl : public BASE { public: std::string AlgorithmName() const {return ALGORITHM_INFO::StaticAlgorithmName();} @@ -32,7 +32,7 @@ public: explicit InvalidRounds(const std::string &algorithm, unsigned int rounds) : InvalidArgument(algorithm + ": " + IntToString(rounds) + " is not a valid number of rounds") {} }; -class HashTransformationWithDefaultTruncation : public HashTransformation +class CRYPTOPP_NO_VTABLE HashTransformationWithDefaultTruncation : public HashTransformation { public: virtual void Final(byte *digest) =0; @@ -53,7 +53,7 @@ public: // ***************************** template -class Bufferless : public T +class CRYPTOPP_NO_VTABLE Bufferless : public T { public: Bufferless() {} @@ -62,7 +62,7 @@ public: }; template -class Unflushable : public T +class CRYPTOPP_NO_VTABLE Unflushable : public T { public: Unflushable() {} @@ -87,7 +87,7 @@ protected: }; template -class InputRejecting : public T +class CRYPTOPP_NO_VTABLE InputRejecting : public T { public: InputRejecting() {} @@ -109,7 +109,7 @@ protected: }; template -class CustomSignalPropagation : public T +class CRYPTOPP_NO_VTABLE CustomSignalPropagation : public T { public: CustomSignalPropagation() {} @@ -124,7 +124,7 @@ private: }; template -class Multichannel : public CustomSignalPropagation +class CRYPTOPP_NO_VTABLE Multichannel : public CustomSignalPropagation { public: Multichannel() {} @@ -159,7 +159,7 @@ public: }; template -class AutoSignaling : public T +class CRYPTOPP_NO_VTABLE AutoSignaling : public T { public: AutoSignaling(int propagation=-1) : m_autoSignalPropagation(propagation) {} @@ -175,7 +175,7 @@ private: }; //! A BufferedTransformation that only contains pre-existing data as "output" -class Store : public AutoSignaling > +class CRYPTOPP_NO_VTABLE Store : public AutoSignaling > { public: Store() : m_messageEnd(false) {} @@ -197,7 +197,7 @@ protected: }; //! A BufferedTransformation that doesn't produce any retrievable output -class Sink : public BufferedTransformation +class CRYPTOPP_NO_VTABLE Sink : public BufferedTransformation { protected: // make these functions protected to help prevent unintentional calls to them diff --git a/skipjack.h b/skipjack.h index 0f6fe94a..99e19fc2 100644 --- a/skipjack.h +++ b/skipjack.h @@ -17,7 +17,7 @@ struct SKIPJACK_Info : public FixedBlockSize<8>, public FixedKeyLength<10> /// SKIPJACK class SKIPJACK : public SKIPJACK_Info, public BlockCipherDocumentation { - class Base : public BlockCipherBaseTemplate + class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate { public: void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length); @@ -28,7 +28,7 @@ class SKIPJACK : public SKIPJACK_Info, public BlockCipherDocumentation FixedSizeSecBlock tab; }; - class Enc : public Base + class CRYPTOPP_NO_VTABLE Enc : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; @@ -37,7 +37,7 @@ class SKIPJACK : public SKIPJACK_Info, public BlockCipherDocumentation static const word32 Te[4][256]; }; - class Dec : public Base + class CRYPTOPP_NO_VTABLE Dec : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; diff --git a/square.h b/square.h index 5ec9007f..236fcaa1 100644 --- a/square.h +++ b/square.h @@ -17,7 +17,7 @@ struct Square_Info : public FixedBlockSize<16>, public FixedKeyLength<16>, Fixed /// Square class Square : public Square_Info, public BlockCipherDocumentation { - class Base : public BlockCipherBaseTemplate + class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate { public: void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length); @@ -26,7 +26,7 @@ class Square : public Square_Info, public BlockCipherDocumentation FixedSizeSecBlock roundkeys; }; - class Enc : public Base + class CRYPTOPP_NO_VTABLE Enc : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; @@ -35,7 +35,7 @@ class Square : public Square_Info, public BlockCipherDocumentation static const word32 Te[4][256]; }; - class Dec : public Base + class CRYPTOPP_NO_VTABLE Dec : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; diff --git a/strciphr.h b/strciphr.h index 8b3c9aa5..bef2f7ea 100644 --- a/strciphr.h +++ b/strciphr.h @@ -35,7 +35,7 @@ NAMESPACE_BEGIN(CryptoPP) template -class AbstractPolicyHolder : public BASE +class CRYPTOPP_NO_VTABLE AbstractPolicyHolder : public BASE { public: typedef POLICY_INTERFACE PolicyInterface; @@ -55,7 +55,7 @@ protected: enum KeystreamOperation {WRITE_KEYSTREAM, XOR_KEYSTREAM, XOR_KEYSTREAM_INPLACE}; -struct AdditiveCipherAbstractPolicy +struct CRYPTOPP_NO_VTABLE AdditiveCipherAbstractPolicy { virtual unsigned int GetAlignment() const =0; virtual unsigned int GetBytesPerIteration() const =0; @@ -70,7 +70,7 @@ struct AdditiveCipherAbstractPolicy }; template -struct AdditiveCipherConcretePolicy : public BASE +struct CRYPTOPP_NO_VTABLE AdditiveCipherConcretePolicy : public BASE { typedef WT WordType; @@ -118,7 +118,7 @@ struct AdditiveCipherConcretePolicy : public BASE }; template > > -class AdditiveCipherTemplate : public BASE +class CRYPTOPP_NO_VTABLE AdditiveCipherTemplate : public BASE { public: byte GenerateByte(); @@ -146,7 +146,7 @@ protected: unsigned int m_leftOver; }; -struct CFB_CipherAbstractPolicy +struct CRYPTOPP_NO_VTABLE CFB_CipherAbstractPolicy { virtual unsigned int GetAlignment() const =0; virtual unsigned int GetBytesPerIteration() const =0; @@ -159,7 +159,7 @@ struct CFB_CipherAbstractPolicy }; template -struct CFB_CipherConcretePolicy : public BASE +struct CRYPTOPP_NO_VTABLE CFB_CipherConcretePolicy : public BASE { typedef WT WordType; @@ -211,7 +211,7 @@ struct CFB_CipherConcretePolicy : public BASE }; template -class CFB_CipherTemplate : public BASE +class CRYPTOPP_NO_VTABLE CFB_CipherTemplate : public BASE { public: void ProcessData(byte *outString, const byte *inString, unsigned int length); @@ -233,14 +233,14 @@ protected: }; template > -class CFB_EncryptionTemplate : public CFB_CipherTemplate +class CRYPTOPP_NO_VTABLE CFB_EncryptionTemplate : public CFB_CipherTemplate { bool IsForwardTransformation() const {return true;} void CombineMessageAndShiftRegister(byte *output, byte *reg, const byte *message, unsigned int length); }; template > -class CFB_DecryptionTemplate : public CFB_CipherTemplate +class CRYPTOPP_NO_VTABLE CFB_DecryptionTemplate : public CFB_CipherTemplate { bool IsForwardTransformation() const {return false;} void CombineMessageAndShiftRegister(byte *output, byte *reg, const byte *message, unsigned int length); diff --git a/tea.h b/tea.h index f1fbe8a4..397db26b 100644 --- a/tea.h +++ b/tea.h @@ -18,7 +18,7 @@ struct TEA_Info : public FixedBlockSize<8>, public FixedKeyLength<16>, public Fi /// TEA class TEA : public TEA_Info, public BlockCipherDocumentation { - class Base : public BlockCipherBaseTemplate + class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate { public: void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length); @@ -28,13 +28,13 @@ class TEA : public TEA_Info, public BlockCipherDocumentation FixedSizeSecBlock k; }; - class Enc : public Base + class CRYPTOPP_NO_VTABLE Enc : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; }; - class Dec : public Base + class CRYPTOPP_NO_VTABLE Dec : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; diff --git a/ttmac.h b/ttmac.h index 7ca7ecfa..7b9a85af 100644 --- a/ttmac.h +++ b/ttmac.h @@ -10,7 +10,7 @@ NAMESPACE_BEGIN(CryptoPP) //! Two-Track-MAC /*! 160 Bit MAC with 160 Bit Key */ -class TTMAC_Base : public FixedKeyLength<20>, public IteratedHash +class CRYPTOPP_NO_VTABLE TTMAC_Base : public FixedKeyLength<20>, public IteratedHash { public: static std::string StaticAlgorithmName() {return std::string("Two-Track-MAC");} diff --git a/twofish.h b/twofish.h index 820a438d..d1edfb7c 100644 --- a/twofish.h +++ b/twofish.h @@ -17,7 +17,7 @@ struct Twofish_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 0, /// Twofish class Twofish : public Twofish_Info, public BlockCipherDocumentation { - class Base : public BlockCipherBaseTemplate + class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate { public: void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length); @@ -33,13 +33,13 @@ class Twofish : public Twofish_Info, public BlockCipherDocumentation FixedSizeSecBlock m_s; }; - class Enc : public Base + class CRYPTOPP_NO_VTABLE Enc : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; }; - class Dec : public Base + class CRYPTOPP_NO_VTABLE Dec : public Base { public: void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; diff --git a/wake.h b/wake.h index b271aa29..230dfc6e 100644 --- a/wake.h +++ b/wake.h @@ -13,7 +13,7 @@ struct WAKE_Info : public FixedKeyLength<32> static const char *StaticAlgorithmName() {return B::ToEnum() == LITTLE_ENDIAN_ORDER ? "WAKE-CFB-LE" : "WAKE-CFB-BE";} }; -class WAKE_Base +class CRYPTOPP_NO_VTABLE WAKE_Base { protected: word32 M(word32 x, word32 y); @@ -24,7 +24,7 @@ protected: }; template -class WAKE_Policy : public WAKE_Info +class CRYPTOPP_NO_VTABLE WAKE_Policy : public WAKE_Info , public CFB_CipherConcretePolicy , public AdditiveCipherConcretePolicy , protected WAKE_Base diff --git a/xormac.h b/xormac.h index 08773627..e7a848c2 100644 --- a/xormac.h +++ b/xormac.h @@ -11,7 +11,7 @@ NAMESPACE_BEGIN(CryptoPP) template struct DigestSizeSubtract4Workaround {enum {RESULT = T::DIGESTSIZE-4};}; // VC60 workaround template -class XMACC_Base : public FixedKeyLength::RESULT, SimpleKeyingInterface::INTERNALLY_GENERATED_IV>, +class CRYPTOPP_NO_VTABLE XMACC_Base : public FixedKeyLength::RESULT, SimpleKeyingInterface::INTERNALLY_GENERATED_IV>, public IteratedHash { public: