add CRYPTOPP_NO_VTABLE
parent
c9f75009a5
commit
a003ea18cc
6
3way.h
6
3way.h
|
|
@ -17,7 +17,7 @@ struct ThreeWay_Info : public FixedBlockSize<12>, public FixedKeyLength<12>, pub
|
|||
/// <a href="http://www.weidai.com/scan-mirror/cs.html#3-Way">3-Way</a>
|
||||
class ThreeWay : public ThreeWay_Info, public BlockCipherDocumentation
|
||||
{
|
||||
class Base : public BlockCipherBaseTemplate<ThreeWay_Info>
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate<ThreeWay_Info>
|
||||
{
|
||||
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<word32, 3> 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;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class Integer;
|
|||
// abcd = group.Add(a, group.Add(b, group.Add(c,d));
|
||||
|
||||
//! Abstract Group
|
||||
template <class T> class AbstractGroup
|
||||
template <class T> class CRYPTOPP_NO_VTABLE AbstractGroup
|
||||
{
|
||||
public:
|
||||
typedef T Element;
|
||||
|
|
@ -41,7 +41,7 @@ public:
|
|||
};
|
||||
|
||||
//! Abstract Ring
|
||||
template <class T> class AbstractRing : public AbstractGroup<T>
|
||||
template <class T> class CRYPTOPP_NO_VTABLE AbstractRing : public AbstractGroup<T>
|
||||
{
|
||||
public:
|
||||
typedef T Element;
|
||||
|
|
@ -135,7 +135,7 @@ template <class Element, class Iterator>
|
|||
// ********************************************************
|
||||
|
||||
//! Abstract Euclidean Domain
|
||||
template <class T> class AbstractEuclideanDomain : public AbstractRing<T>
|
||||
template <class T> class CRYPTOPP_NO_VTABLE AbstractEuclideanDomain : public AbstractRing<T>
|
||||
{
|
||||
public:
|
||||
typedef T Element;
|
||||
|
|
|
|||
8
arc4.h
8
arc4.h
|
|
@ -6,8 +6,8 @@
|
|||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
//! <a href="http://www.weidai.com/scan-mirror/cs.html#RC4">Alleged RC4</a>
|
||||
/*! 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_Base> 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";}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ struct Blowfish_Info : public FixedBlockSize<8>, public VariableKeyLength<16, 1,
|
|||
//! <a href="http://www.weidai.com/scan-mirror/cs.html#Blowfish">Blowfish</a>
|
||||
class Blowfish : public Blowfish_Info, public BlockCipherDocumentation
|
||||
{
|
||||
class Base : public BlockCipherBaseTemplate<Blowfish_Info>
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate<Blowfish_Info>
|
||||
{
|
||||
public:
|
||||
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ struct Camellia_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 1
|
|||
/// <a href="http://www.weidai.com/scan-mirror/cs.html#Camellia">Camellia</a>
|
||||
class Camellia : public Camellia_Info, public BlockCipherDocumentation
|
||||
{
|
||||
class Base : public BlockCipherBaseTemplate<Camellia_Info>
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate<Camellia_Info>
|
||||
{
|
||||
public:
|
||||
void UncheckedSetKey(CipherDir dir, const byte *key, unsigned int keylen);
|
||||
|
|
|
|||
8
cast.h
8
cast.h
|
|
@ -24,7 +24,7 @@ struct CAST128_Info : public FixedBlockSize<8>, public VariableKeyLength<16, 5,
|
|||
/// <a href="http://www.weidai.com/scan-mirror/cs.html#CAST-128">CAST-128</a>
|
||||
class CAST128 : public CAST128_Info, public BlockCipherDocumentation
|
||||
{
|
||||
class Base : public CAST, public BlockCipherBaseTemplate<CAST128_Info>
|
||||
class CRYPTOPP_NO_VTABLE Base : public CAST, public BlockCipherBaseTemplate<CAST128_Info>
|
||||
{
|
||||
public:
|
||||
void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length);
|
||||
|
|
@ -34,13 +34,13 @@ class CAST128 : public CAST128_Info, public BlockCipherDocumentation
|
|||
FixedSizeSecBlock<word32, 32> 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
|
|||
//! <a href="http://www.weidai.com/scan-mirror/cs.html#CAST-256">CAST-256</a>
|
||||
class CAST256 : public CAST256_Info, public BlockCipherDocumentation
|
||||
{
|
||||
class Base : public CAST, public BlockCipherBaseTemplate<CAST256_Info>
|
||||
class CRYPTOPP_NO_VTABLE Base : public CAST, public BlockCipherBaseTemplate<CAST256_Info>
|
||||
{
|
||||
public:
|
||||
void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length = 8);
|
||||
|
|
|
|||
2
cbcmac.h
2
cbcmac.h
|
|
@ -7,7 +7,7 @@
|
|||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
template <class T>
|
||||
class CBC_MAC_Base : public SameKeyLengthAs<T>, public MessageAuthenticationCode
|
||||
class CRYPTOPP_NO_VTABLE CBC_MAC_Base : public SameKeyLengthAs<T>, public MessageAuthenticationCode
|
||||
{
|
||||
public:
|
||||
static std::string StaticAlgorithmName() {return std::string("CBC-MAC(") + T::StaticAlgorithmName() + ")";}
|
||||
|
|
|
|||
8
des.h
8
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<DES_Info>
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate<DES_Info>
|
||||
{
|
||||
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>
|
|||
/// <a href="http://www.weidai.com/scan-mirror/cs.html#DESede">DES-EDE2</a>
|
||||
class DES_EDE2 : public DES_EDE2_Info, public BlockCipherDocumentation
|
||||
{
|
||||
class Base : public BlockCipherBaseTemplate<DES_EDE2_Info>
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate<DES_EDE2_Info>
|
||||
{
|
||||
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>
|
|||
/// <a href="http://www.weidai.com/scan-mirror/cs.html#DESede">DES-EDE3</a>
|
||||
class DES_EDE3 : public DES_EDE3_Info, public BlockCipherDocumentation
|
||||
{
|
||||
class Base : public BlockCipherBaseTemplate<DES_EDE3_Info>
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate<DES_EDE3_Info>
|
||||
{
|
||||
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>
|
|||
/// <a href="http://www.weidai.com/scan-mirror/cs.html#DESX">DES-XEX3</a>, AKA DESX
|
||||
class DES_XEX3 : public DES_XEX3_Info, public BlockCipherDocumentation
|
||||
{
|
||||
class Base : public BlockCipherBaseTemplate<DES_XEX3_Info>
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate<DES_XEX3_Info>
|
||||
{
|
||||
public:
|
||||
void UncheckedSetKey(CipherDir dir, const byte *key, unsigned int length);
|
||||
|
|
|
|||
12
diamond.h
12
diamond.h
|
|
@ -17,7 +17,7 @@ struct Diamond2_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 1
|
|||
/// <a href="http://www.weidai.com/scan-mirror/cs.html#Diamond2">Diamond2</a>
|
||||
class Diamond2 : public Diamond2_Info, public BlockCipherDocumentation
|
||||
{
|
||||
class Base : public BlockCipherBaseTemplate<Diamond2_Info>
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate<Diamond2_Info>
|
||||
{
|
||||
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
|
|||
/// <a href="http://www.weidai.com/scan-mirror/cs.html#Diamond2">Diamond2Lite</a>
|
||||
class Diamond2Lite : public Diamond2Lite_Info, public BlockCipherDocumentation
|
||||
{
|
||||
class Base : public BlockCipherBaseTemplate<Diamond2Lite_Info>
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate<Diamond2Lite_Info>
|
||||
{
|
||||
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;
|
||||
|
|
|
|||
2
dmac.h
2
dmac.h
|
|
@ -6,7 +6,7 @@
|
|||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
template <class T>
|
||||
class DMAC_Base : public SameKeyLengthAs<T>, public MessageAuthenticationCode
|
||||
class CRYPTOPP_NO_VTABLE DMAC_Base : public SameKeyLengthAs<T>, public MessageAuthenticationCode
|
||||
{
|
||||
public:
|
||||
static std::string StaticAlgorithmName() {return std::string("DMAC(") + T::StaticAlgorithmName() + ")";}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
class ElGamalBase : public DL_KeyAgreementAlgorithm_DH<Integer, NoCofactorMultiplication>,
|
||||
class CRYPTOPP_NO_VTABLE ElGamalBase : public DL_KeyAgreementAlgorithm_DH<Integer, NoCofactorMultiplication>,
|
||||
public DL_KeyDerivationAlgorithm<Integer>,
|
||||
public DL_SymmetricEncryptionAlgorithm
|
||||
{
|
||||
|
|
@ -75,7 +75,7 @@ public:
|
|||
};
|
||||
|
||||
template <class BASE, class SCHEME_OPTIONS, class KEY>
|
||||
class ElGamalObjectImpl : public DL_ObjectImplBase<BASE, SCHEME_OPTIONS, KEY>, public ElGamalBase
|
||||
class CRYPTOPP_NO_VTABLE ElGamalObjectImpl : public DL_ObjectImplBase<BASE, SCHEME_OPTIONS, KEY>, 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<DL_EncryptorBase<Integer, PK_FixedLengthEncryptor>, SchemeOptions, SchemeOptions::PublicKey>, public PublicKeyCopier<SchemeOptions>
|
||||
class CRYPTOPP_NO_VTABLE EncryptorImpl : public ElGamalObjectImpl<DL_EncryptorBase<Integer, PK_FixedLengthEncryptor>, SchemeOptions, SchemeOptions::PublicKey>, public PublicKeyCopier<SchemeOptions>
|
||||
{
|
||||
public:
|
||||
void CopyKeyInto(SchemeOptions::PublicKey &key) const
|
||||
{key = GetKey();}
|
||||
};
|
||||
|
||||
class DecryptorImpl : public ElGamalObjectImpl<DL_DecryptorBase<Integer, PK_FixedLengthDecryptor>, SchemeOptions, SchemeOptions::PrivateKey>, public PrivateKeyCopier<SchemeOptions>
|
||||
class CRYPTOPP_NO_VTABLE DecryptorImpl : public ElGamalObjectImpl<DL_DecryptorBase<Integer, PK_FixedLengthDecryptor>, SchemeOptions, SchemeOptions::PrivateKey>, public PrivateKeyCopier<SchemeOptions>
|
||||
{
|
||||
public:
|
||||
void CopyKeyInto(SchemeOptions::PublicKey &key) const
|
||||
|
|
|
|||
|
|
@ -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<Filter>
|
||||
class CRYPTOPP_NO_VTABLE Source : public InputRejecting<Filter>
|
||||
{
|
||||
public:
|
||||
Source(BufferedTransformation *attachment)
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
//! .
|
||||
class DL_GroupParameters_IntegerBased : public DL_GroupParameters<Integer>, public ASN1CryptoMaterial
|
||||
class CRYPTOPP_NO_VTABLE DL_GroupParameters_IntegerBased : public DL_GroupParameters<Integer>, public ASN1CryptoMaterial
|
||||
{
|
||||
typedef DL_GroupParameters_IntegerBased ThisClass;
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ private:
|
|||
|
||||
//! .
|
||||
template <class GROUP_PRECOMP, class BASE_PRECOMP = DL_FixedBasePrecomputationImpl<CPP_TYPENAME GROUP_PRECOMP::Element> >
|
||||
class DL_GroupParameters_IntegerBasedImpl : public DL_GroupParametersImpl<GROUP_PRECOMP, BASE_PRECOMP, DL_GroupParameters_IntegerBased>
|
||||
class CRYPTOPP_NO_VTABLE DL_GroupParameters_IntegerBasedImpl : public DL_GroupParametersImpl<GROUP_PRECOMP, BASE_PRECOMP, DL_GroupParameters_IntegerBased>
|
||||
{
|
||||
typedef DL_GroupParameters_IntegerBasedImpl<GROUP_PRECOMP, BASE_PRECOMP> ThisClass;
|
||||
|
||||
|
|
|
|||
6
gost.h
6
gost.h
|
|
@ -17,7 +17,7 @@ struct GOST_Info : public FixedBlockSize<8>, public FixedKeyLength<32>
|
|||
/// <a href="http://www.weidai.com/scan-mirror/cs.html#GOST">GOST</a>
|
||||
class GOST : public GOST_Info, public BlockCipherDocumentation
|
||||
{
|
||||
class Base : public BlockCipherBaseTemplate<GOST_Info>
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate<GOST_Info>
|
||||
{
|
||||
public:
|
||||
void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length);
|
||||
|
|
@ -32,13 +32,13 @@ class GOST : public GOST_Info, public BlockCipherDocumentation
|
|||
FixedSizeSecBlock<word32, 8> 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;
|
||||
|
|
|
|||
2
hmac.h
2
hmac.h
|
|
@ -9,7 +9,7 @@
|
|||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
template <class T>
|
||||
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() + ")";}
|
||||
|
|
|
|||
2
idea.h
2
idea.h
|
|
@ -17,7 +17,7 @@ struct IDEA_Info : public FixedBlockSize<8>, public FixedKeyLength<16>, public F
|
|||
/// <a href="http://www.weidai.com/scan-mirror/cs.html#IDEA">IDEA</a>
|
||||
class IDEA : public IDEA_Info, public BlockCipherDocumentation
|
||||
{
|
||||
class Base : public BlockCipherBaseTemplate<IDEA_Info>
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate<IDEA_Info>
|
||||
{
|
||||
public:
|
||||
unsigned int GetAlignment() const {return 2;}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
template <class T, class BASE>
|
||||
class IteratedHashBase : public BASE
|
||||
class CRYPTOPP_NO_VTABLE IteratedHashBase : public BASE
|
||||
{
|
||||
public:
|
||||
typedef T HashWordType;
|
||||
|
|
@ -40,7 +40,7 @@ private:
|
|||
|
||||
//! .
|
||||
template <class T, class B, class BASE>
|
||||
class IteratedHashBase2 : public IteratedHashBase<T, BASE>
|
||||
class CRYPTOPP_NO_VTABLE IteratedHashBase2 : public IteratedHashBase<T, BASE>
|
||||
{
|
||||
public:
|
||||
IteratedHashBase2(unsigned int blockSize, unsigned int digestSize)
|
||||
|
|
@ -64,7 +64,7 @@ protected:
|
|||
|
||||
//! .
|
||||
template <class T, class B, unsigned int S, class BASE = HashTransformation>
|
||||
class IteratedHash : public IteratedHashBase2<T, B, BASE>
|
||||
class CRYPTOPP_NO_VTABLE IteratedHash : public IteratedHashBase2<T, B, BASE>
|
||||
{
|
||||
public:
|
||||
enum {BLOCKSIZE = S};
|
||||
|
|
@ -78,7 +78,7 @@ protected:
|
|||
};
|
||||
|
||||
template <class T, class B, unsigned int S, class M>
|
||||
class IteratedHashWithStaticTransform : public IteratedHash<T, B, S>
|
||||
class CRYPTOPP_NO_VTABLE IteratedHashWithStaticTransform : public IteratedHash<T, B, S>
|
||||
{
|
||||
protected:
|
||||
IteratedHashWithStaticTransform(unsigned int digestSize) : IteratedHash<T, B, S>(digestSize) {}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ struct LR_Info : public VariableKeyLength<16, 0, 2*(UINT_MAX/2), 2>, public Fixe
|
|||
template <class T>
|
||||
class LR : public LR_Info<T>, public BlockCipherDocumentation
|
||||
{
|
||||
class Base : public BlockCipherBaseTemplate<LR_Info<T> >
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate<LR_Info<T> >
|
||||
{
|
||||
public:
|
||||
// VC60 workaround: have to define these functions within class definition
|
||||
|
|
@ -46,7 +46,7 @@ class LR : public LR_Info<T>, 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<T>, 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
|
||||
|
|
|
|||
6
mars.h
6
mars.h
|
|
@ -17,7 +17,7 @@ struct MARS_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 16, 5
|
|||
/// <a href="http://www.weidai.com/scan-mirror/cs.html#MARS">MARS</a>
|
||||
class MARS : public MARS_Info, public BlockCipherDocumentation
|
||||
{
|
||||
class Base : public BlockCipherBaseTemplate<MARS_Info>
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate<MARS_Info>
|
||||
{
|
||||
public:
|
||||
void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length);
|
||||
|
|
@ -28,13 +28,13 @@ class MARS : public MARS_Info, public BlockCipherDocumentation
|
|||
FixedSizeSecBlock<word32, 40> 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;
|
||||
|
|
|
|||
2
md5mac.h
2
md5mac.h
|
|
@ -10,7 +10,7 @@
|
|||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
//! .
|
||||
class MD5MAC_Base : public FixedKeyLength<16>, public IteratedHash<word32, LittleEndian, 64, MessageAuthenticationCode>
|
||||
class CRYPTOPP_NO_VTABLE MD5MAC_Base : public FixedKeyLength<16>, public IteratedHash<word32, LittleEndian, 64, MessageAuthenticationCode>
|
||||
{
|
||||
public:
|
||||
static std::string StaticAlgorithmName() {return "MD5-MAC";}
|
||||
|
|
|
|||
2
mdc.h
2
mdc.h
|
|
@ -22,7 +22,7 @@ struct MDC_Info : public FixedBlockSize<T::DIGESTSIZE>, public FixedKeyLength<T:
|
|||
template <class T>
|
||||
class MDC : public MDC_Info<T>
|
||||
{
|
||||
class Enc : public BlockCipherBaseTemplate<MDC_Info<T> >
|
||||
class CRYPTOPP_NO_VTABLE Enc : public BlockCipherBaseTemplate<MDC_Info<T> >
|
||||
{
|
||||
typedef typename T::HashWordType HashWordType;
|
||||
|
||||
|
|
|
|||
24
modes.h
24
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 POLICY_INTERFACE>
|
||||
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<CFB_CipherAbstractPolicy>
|
||||
class CRYPTOPP_NO_VTABLE CFB_ModePolicy : public ModePolicyCommonTemplate<CFB_CipherAbstractPolicy>
|
||||
{
|
||||
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<AdditiveCipherAbstractPolicy>
|
||||
class CRYPTOPP_NO_VTABLE OFB_ModePolicy : public ModePolicyCommonTemplate<AdditiveCipherAbstractPolicy>
|
||||
{
|
||||
unsigned int GetBytesPerIteration() const {return BlockSize();}
|
||||
unsigned int GetIterationsToBuffer() const {return 1;}
|
||||
|
|
@ -135,7 +135,7 @@ class OFB_ModePolicy : public ModePolicyCommonTemplate<AdditiveCipherAbstractPol
|
|||
IV_Requirement IVRequirement() const {return STRUCTURED_IV;}
|
||||
};
|
||||
|
||||
class CTR_ModePolicy : public ModePolicyCommonTemplate<AdditiveCipherAbstractPolicy>
|
||||
class CRYPTOPP_NO_VTABLE CTR_ModePolicy : public ModePolicyCommonTemplate<AdditiveCipherAbstractPolicy>
|
||||
{
|
||||
unsigned int GetBytesPerIteration() const {return BlockSize();}
|
||||
unsigned int GetIterationsToBuffer() const {return m_cipher->OptimalNumberOfParallelBlocks();}
|
||||
|
|
@ -153,7 +153,7 @@ class CTR_ModePolicy : public ModePolicyCommonTemplate<AdditiveCipherAbstractPol
|
|||
SecByteBlock m_counterArray;
|
||||
};
|
||||
|
||||
class BlockOrientedCipherModeBase : public CipherModeBase
|
||||
class CRYPTOPP_NO_VTABLE BlockOrientedCipherModeBase : public CipherModeBase
|
||||
{
|
||||
public:
|
||||
void UncheckedSetKey(const NameValuePairs ¶ms, const byte *key, unsigned int length, const byte *iv);
|
||||
|
|
@ -176,7 +176,7 @@ protected:
|
|||
SecByteBlock m_buffer;
|
||||
};
|
||||
|
||||
class ECB_OneWay : public BlockOrientedCipherModeBase
|
||||
class CRYPTOPP_NO_VTABLE ECB_OneWay : public BlockOrientedCipherModeBase
|
||||
{
|
||||
public:
|
||||
IV_Requirement IVRequirement() const {return NOT_RESYNCHRONIZABLE;}
|
||||
|
|
@ -185,7 +185,7 @@ public:
|
|||
{m_cipher->ProcessAndXorMultipleBlocks(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;}
|
||||
|
|
|
|||
12
network.h
12
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<Source>
|
||||
class CRYPTOPP_NO_VTABLE NonblockingSource : public AutoSignaling<Source>
|
||||
{
|
||||
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)
|
||||
|
|
|
|||
4
panama.h
4
panama.h
|
|
@ -10,7 +10,7 @@ NAMESPACE_BEGIN(CryptoPP)
|
|||
|
||||
/// base class, do not use directly
|
||||
template <class B>
|
||||
class Panama
|
||||
class CRYPTOPP_NO_VTABLE Panama
|
||||
{
|
||||
public:
|
||||
void Reset();
|
||||
|
|
@ -42,7 +42,7 @@ protected:
|
|||
|
||||
//! .
|
||||
template <class B = LittleEndian>
|
||||
class PanamaMAC_Base : public PanamaHash<B>, public VariableKeyLength<32, 0, UINT_MAX>, public MessageAuthenticationCode
|
||||
class CRYPTOPP_NO_VTABLE PanamaMAC_Base : public PanamaHash<B>, public VariableKeyLength<32, 0, UINT_MAX>, public MessageAuthenticationCode
|
||||
{
|
||||
public:
|
||||
void UncheckedSetKey(const byte *userKey, unsigned int keylength)
|
||||
|
|
|
|||
6
rc2.h
6
rc2.h
|
|
@ -18,7 +18,7 @@ struct RC2_Info : public FixedBlockSize<8>, public VariableKeyLength<16, 1, 128>
|
|||
/// <a href="http://www.weidai.com/scan-mirror/cs.html#RC2">RC2</a>
|
||||
class RC2 : public RC2_Info, public BlockCipherDocumentation
|
||||
{
|
||||
class Base : public BlockCipherBaseTemplate<RC2_Info>
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate<RC2_Info>
|
||||
{
|
||||
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<word16, 64> 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;
|
||||
|
|
|
|||
6
rc5.h
6
rc5.h
|
|
@ -18,7 +18,7 @@ struct RC5_Info : public FixedBlockSize<8>, public VariableKeyLength<16, 0, 255>
|
|||
/// <a href="http://www.weidai.com/scan-mirror/cs.html#RC5">RC5</a>
|
||||
class RC5 : public RC5_Info, public BlockCipherDocumentation
|
||||
{
|
||||
class Base : public BlockCipherBaseTemplate<RC5_Info>
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate<RC5_Info>
|
||||
{
|
||||
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<RC5_WORD> 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;
|
||||
|
|
|
|||
6
rc6.h
6
rc6.h
|
|
@ -18,7 +18,7 @@ struct RC6_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 0, 255
|
|||
/// <a href="http://www.weidai.com/scan-mirror/cs.html#RC6">RC6</a>
|
||||
class RC6 : public RC6_Info, public BlockCipherDocumentation
|
||||
{
|
||||
class Base : public BlockCipherBaseTemplate<RC6_Info>
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate<RC6_Info>
|
||||
{
|
||||
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<RC6_WORD> 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;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ struct Rijndael_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 1
|
|||
/// <a href="http://www.weidai.com/scan-mirror/cs.html#Rijndael">Rijndael</a>
|
||||
class Rijndael : public Rijndael_Info, public BlockCipherDocumentation
|
||||
{
|
||||
class Base : public BlockCipherBaseTemplate<Rijndael_Info>
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate<Rijndael_Info>
|
||||
{
|
||||
public:
|
||||
void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length);
|
||||
|
|
@ -41,13 +41,13 @@ class Rijndael : public Rijndael_Info, public BlockCipherDocumentation
|
|||
SecBlock<word32> 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;
|
||||
|
|
|
|||
14
safer.h
14
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,
|
|||
/// <a href="http://www.weidai.com/scan-mirror/cs.html#SAFER-K">SAFER-K</a>
|
||||
class SAFER_K : public SAFER_K_Info, public SAFER, public BlockCipherDocumentation
|
||||
{
|
||||
class Enc : public BlockCipherBaseTemplate<SAFER_K_Info, SAFER::Enc>
|
||||
class CRYPTOPP_NO_VTABLE Enc : public BlockCipherBaseTemplate<SAFER_K_Info, SAFER::Enc>
|
||||
{
|
||||
public:
|
||||
Enc() {strengthened = false;}
|
||||
};
|
||||
|
||||
class Dec : public BlockCipherBaseTemplate<SAFER_K_Info, SAFER::Dec>
|
||||
class CRYPTOPP_NO_VTABLE Dec : public BlockCipherBaseTemplate<SAFER_K_Info, SAFER::Dec>
|
||||
{
|
||||
public:
|
||||
Dec() {strengthened = false;}
|
||||
|
|
@ -73,13 +73,13 @@ struct SAFER_SK_Info : public FixedBlockSize<8>, public VariableKeyLength<16, 8,
|
|||
/// <a href="http://www.weidai.com/scan-mirror/cs.html#SAFER-SK">SAFER-SK</a>
|
||||
class SAFER_SK : public SAFER_SK_Info, public SAFER, public BlockCipherDocumentation
|
||||
{
|
||||
class Enc : public BlockCipherBaseTemplate<SAFER_SK_Info, SAFER::Enc>
|
||||
class CRYPTOPP_NO_VTABLE Enc : public BlockCipherBaseTemplate<SAFER_SK_Info, SAFER::Enc>
|
||||
{
|
||||
public:
|
||||
Enc() {strengthened = true;}
|
||||
};
|
||||
|
||||
class Dec : public BlockCipherBaseTemplate<SAFER_SK_Info, SAFER::Dec>
|
||||
class CRYPTOPP_NO_VTABLE Dec : public BlockCipherBaseTemplate<SAFER_SK_Info, SAFER::Dec>
|
||||
{
|
||||
public:
|
||||
Dec() {strengthened = true;}
|
||||
|
|
|
|||
2
seal.h
2
seal.h
|
|
@ -12,7 +12,7 @@ struct SEAL_Info : public FixedKeyLength<20, SimpleKeyingInterface::INTERNALLY_G
|
|||
};
|
||||
|
||||
template <class B = BigEndian>
|
||||
class SEAL_Policy : public AdditiveCipherConcretePolicy<word32, 256>, public SEAL_Info<B>
|
||||
class CRYPTOPP_NO_VTABLE SEAL_Policy : public AdditiveCipherConcretePolicy<word32, 256>, public SEAL_Info<B>
|
||||
{
|
||||
public:
|
||||
unsigned int IVSize() const {return 4;}
|
||||
|
|
|
|||
4
seckey.h
4
seckey.h
|
|
@ -139,7 +139,7 @@ static inline void CheckedSetKey(T *obj, CipherDir dir, const byte *key, unsigne
|
|||
|
||||
//! .
|
||||
template <class BASE, class INFO = BASE>
|
||||
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 INFO, class INTERFACE = BlockCipher>
|
||||
class BlockCipherBaseTemplate : public AlgorithmImpl<SimpleKeyingInterfaceImpl<TwoBases<INFO, INTERFACE> > >
|
||||
class CRYPTOPP_NO_VTABLE BlockCipherBaseTemplate : public AlgorithmImpl<SimpleKeyingInterfaceImpl<TwoBases<INFO, INTERFACE> > >
|
||||
{
|
||||
public:
|
||||
unsigned int BlockSize() const {return BLOCKSIZE;}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ struct Serpent_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 1,
|
|||
/// <a href="http://www.weidai.com/scan-mirror/cs.html#Serpent">Serpent</a>
|
||||
class Serpent : public Serpent_Info, public BlockCipherDocumentation
|
||||
{
|
||||
class Base : public BlockCipherBaseTemplate<Serpent_Info>
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate<Serpent_Info>
|
||||
{
|
||||
public:
|
||||
void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length);
|
||||
|
|
@ -26,13 +26,13 @@ class Serpent : public Serpent_Info, public BlockCipherDocumentation
|
|||
FixedSizeSecBlock<word32, 140> 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;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ struct SHACAL2_Info : public FixedBlockSize<32>, public VariableKeyLength<16, 16
|
|||
/// <a href="http://www.weidai.com/scan-mirror/cs.html#SHACAL-2">SHACAL-2</a>
|
||||
class SHACAL2 : public SHACAL2_Info, public BlockCipherDocumentation
|
||||
{
|
||||
class Base : public BlockCipherBaseTemplate<SHACAL2_Info>
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate<SHACAL2_Info>
|
||||
{
|
||||
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;
|
||||
|
|
|
|||
6
shark.h
6
shark.h
|
|
@ -21,7 +21,7 @@ struct SHARK_Info : public FixedBlockSize<8>, public VariableKeyLength<16, 1, 16
|
|||
/// <a href="http://www.weidai.com/scan-mirror/cs.html#SHARK-E">SHARK-E</a>
|
||||
class SHARK : public SHARK_Info, public BlockCipherDocumentation
|
||||
{
|
||||
class Base : public BlockCipherBaseTemplate<SHARK_Info>
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate<SHARK_Info>
|
||||
{
|
||||
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<word64> 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;
|
||||
|
|
|
|||
20
simple.h
20
simple.h
|
|
@ -12,7 +12,7 @@
|
|||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
template <class BASE, class ALGORITHM_INFO = BASE>
|
||||
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 T>
|
||||
class Bufferless : public T
|
||||
class CRYPTOPP_NO_VTABLE Bufferless : public T
|
||||
{
|
||||
public:
|
||||
Bufferless() {}
|
||||
|
|
@ -62,7 +62,7 @@ public:
|
|||
};
|
||||
|
||||
template <class T>
|
||||
class Unflushable : public T
|
||||
class CRYPTOPP_NO_VTABLE Unflushable : public T
|
||||
{
|
||||
public:
|
||||
Unflushable() {}
|
||||
|
|
@ -87,7 +87,7 @@ protected:
|
|||
};
|
||||
|
||||
template <class T>
|
||||
class InputRejecting : public T
|
||||
class CRYPTOPP_NO_VTABLE InputRejecting : public T
|
||||
{
|
||||
public:
|
||||
InputRejecting() {}
|
||||
|
|
@ -109,7 +109,7 @@ protected:
|
|||
};
|
||||
|
||||
template <class T>
|
||||
class CustomSignalPropagation : public T
|
||||
class CRYPTOPP_NO_VTABLE CustomSignalPropagation : public T
|
||||
{
|
||||
public:
|
||||
CustomSignalPropagation() {}
|
||||
|
|
@ -124,7 +124,7 @@ private:
|
|||
};
|
||||
|
||||
template <class T>
|
||||
class Multichannel : public CustomSignalPropagation<T>
|
||||
class CRYPTOPP_NO_VTABLE Multichannel : public CustomSignalPropagation<T>
|
||||
{
|
||||
public:
|
||||
Multichannel() {}
|
||||
|
|
@ -159,7 +159,7 @@ public:
|
|||
};
|
||||
|
||||
template <class T>
|
||||
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<InputRejecting<BufferedTransformation> >
|
||||
class CRYPTOPP_NO_VTABLE Store : public AutoSignaling<InputRejecting<BufferedTransformation> >
|
||||
{
|
||||
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
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ struct SKIPJACK_Info : public FixedBlockSize<8>, public FixedKeyLength<10>
|
|||
/// <a href="http://www.weidai.com/scan-mirror/cs.html#SKIPJACK">SKIPJACK</a>
|
||||
class SKIPJACK : public SKIPJACK_Info, public BlockCipherDocumentation
|
||||
{
|
||||
class Base : public BlockCipherBaseTemplate<SKIPJACK_Info>
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate<SKIPJACK_Info>
|
||||
{
|
||||
public:
|
||||
void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length);
|
||||
|
|
@ -28,7 +28,7 @@ class SKIPJACK : public SKIPJACK_Info, public BlockCipherDocumentation
|
|||
FixedSizeSecBlock<byte[256], 10> 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;
|
||||
|
|
|
|||
6
square.h
6
square.h
|
|
@ -17,7 +17,7 @@ struct Square_Info : public FixedBlockSize<16>, public FixedKeyLength<16>, Fixed
|
|||
/// <a href="http://www.weidai.com/scan-mirror/cs.html#Square">Square</a>
|
||||
class Square : public Square_Info, public BlockCipherDocumentation
|
||||
{
|
||||
class Base : public BlockCipherBaseTemplate<Square_Info>
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate<Square_Info>
|
||||
{
|
||||
public:
|
||||
void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length);
|
||||
|
|
@ -26,7 +26,7 @@ class Square : public Square_Info, public BlockCipherDocumentation
|
|||
FixedSizeSecBlock<word32[4], ROUNDS+1> 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;
|
||||
|
|
|
|||
18
strciphr.h
18
strciphr.h
|
|
@ -35,7 +35,7 @@
|
|||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
template <class POLICY_INTERFACE, class BASE = Empty>
|
||||
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 <typename WT, unsigned int W, unsigned int X = 1, class BASE = AdditiveCipherAbstractPolicy>
|
||||
struct AdditiveCipherConcretePolicy : public BASE
|
||||
struct CRYPTOPP_NO_VTABLE AdditiveCipherConcretePolicy : public BASE
|
||||
{
|
||||
typedef WT WordType;
|
||||
|
||||
|
|
@ -118,7 +118,7 @@ struct AdditiveCipherConcretePolicy : public BASE
|
|||
};
|
||||
|
||||
template <class BASE = AbstractPolicyHolder<AdditiveCipherAbstractPolicy, TwoBases<SymmetricCipher, RandomNumberGenerator> > >
|
||||
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 <typename WT, unsigned int W, class BASE = CFB_CipherAbstractPolicy>
|
||||
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 BASE>
|
||||
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 BASE = AbstractPolicyHolder<CFB_CipherAbstractPolicy, SymmetricCipher> >
|
||||
class CFB_EncryptionTemplate : public CFB_CipherTemplate<BASE>
|
||||
class CRYPTOPP_NO_VTABLE CFB_EncryptionTemplate : public CFB_CipherTemplate<BASE>
|
||||
{
|
||||
bool IsForwardTransformation() const {return true;}
|
||||
void CombineMessageAndShiftRegister(byte *output, byte *reg, const byte *message, unsigned int length);
|
||||
};
|
||||
|
||||
template <class BASE = AbstractPolicyHolder<CFB_CipherAbstractPolicy, SymmetricCipher> >
|
||||
class CFB_DecryptionTemplate : public CFB_CipherTemplate<BASE>
|
||||
class CRYPTOPP_NO_VTABLE CFB_DecryptionTemplate : public CFB_CipherTemplate<BASE>
|
||||
{
|
||||
bool IsForwardTransformation() const {return false;}
|
||||
void CombineMessageAndShiftRegister(byte *output, byte *reg, const byte *message, unsigned int length);
|
||||
|
|
|
|||
6
tea.h
6
tea.h
|
|
@ -18,7 +18,7 @@ struct TEA_Info : public FixedBlockSize<8>, public FixedKeyLength<16>, public Fi
|
|||
/// <a href="http://www.weidai.com/scan-mirror/cs.html#TEA">TEA</a>
|
||||
class TEA : public TEA_Info, public BlockCipherDocumentation
|
||||
{
|
||||
class Base : public BlockCipherBaseTemplate<TEA_Info>
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate<TEA_Info>
|
||||
{
|
||||
public:
|
||||
void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length);
|
||||
|
|
@ -28,13 +28,13 @@ class TEA : public TEA_Info, public BlockCipherDocumentation
|
|||
FixedSizeSecBlock<word32, 4> 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;
|
||||
|
|
|
|||
2
ttmac.h
2
ttmac.h
|
|
@ -10,7 +10,7 @@ NAMESPACE_BEGIN(CryptoPP)
|
|||
//! <a href="http://www.eskimo.com/~weidai/scan-mirror/mac.html#Two-Track-MAC">Two-Track-MAC</a>
|
||||
/*! 160 Bit MAC with 160 Bit Key */
|
||||
|
||||
class TTMAC_Base : public FixedKeyLength<20>, public IteratedHash<word32, LittleEndian, 64, MessageAuthenticationCode>
|
||||
class CRYPTOPP_NO_VTABLE TTMAC_Base : public FixedKeyLength<20>, public IteratedHash<word32, LittleEndian, 64, MessageAuthenticationCode>
|
||||
{
|
||||
public:
|
||||
static std::string StaticAlgorithmName() {return std::string("Two-Track-MAC");}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ struct Twofish_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 0,
|
|||
/// <a href="http://www.weidai.com/scan-mirror/cs.html#Twofish">Twofish</a>
|
||||
class Twofish : public Twofish_Info, public BlockCipherDocumentation
|
||||
{
|
||||
class Base : public BlockCipherBaseTemplate<Twofish_Info>
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate<Twofish_Info>
|
||||
{
|
||||
public:
|
||||
void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length);
|
||||
|
|
@ -33,13 +33,13 @@ class Twofish : public Twofish_Info, public BlockCipherDocumentation
|
|||
FixedSizeSecBlock<word32[256], 4> 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;
|
||||
|
|
|
|||
4
wake.h
4
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 B = BigEndian>
|
||||
class WAKE_Policy : public WAKE_Info<B>
|
||||
class CRYPTOPP_NO_VTABLE WAKE_Policy : public WAKE_Info<B>
|
||||
, public CFB_CipherConcretePolicy<word32, 1>
|
||||
, public AdditiveCipherConcretePolicy<word32, 1, 64>
|
||||
, protected WAKE_Base
|
||||
|
|
|
|||
2
xormac.h
2
xormac.h
|
|
@ -11,7 +11,7 @@ NAMESPACE_BEGIN(CryptoPP)
|
|||
template <class T> struct DigestSizeSubtract4Workaround {enum {RESULT = T::DIGESTSIZE-4};}; // VC60 workaround
|
||||
|
||||
template <class T>
|
||||
class XMACC_Base : public FixedKeyLength<DigestSizeSubtract4Workaround<T>::RESULT, SimpleKeyingInterface::INTERNALLY_GENERATED_IV>,
|
||||
class CRYPTOPP_NO_VTABLE XMACC_Base : public FixedKeyLength<DigestSizeSubtract4Workaround<T>::RESULT, SimpleKeyingInterface::INTERNALLY_GENERATED_IV>,
|
||||
public IteratedHash<typename T::HashWordType, typename T::ByteOrderClass, T::BLOCKSIZE, MessageAuthenticationCode>
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
Loading…
Reference in New Issue