Commit 16bdbafa authored by Alexey.Musinov's avatar Alexey.Musinov

fix for build

parent 089871d3
......@@ -478,9 +478,15 @@ protected:
T m_value;
};
//template class AlgorithmParametersTemplate<bool>;
//template class AlgorithmParametersTemplate<int>;
//template class AlgorithmParametersTemplate<ConstByteArrayParameter>;
#ifdef _IOS
template class AlgorithmParametersTemplate<bool>;
template class AlgorithmParametersTemplate<int>;
template class AlgorithmParametersTemplate<ConstByteArrayParameter>;
#else
CRYPTOPP_DLL_TEMPLATE_CLASS AlgorithmParametersTemplate<bool>;
CRYPTOPP_DLL_TEMPLATE_CLASS AlgorithmParametersTemplate<int>;
CRYPTOPP_DLL_TEMPLATE_CLASS AlgorithmParametersTemplate<ConstByteArrayParameter>;
#endif
//! \class AlgorithmParameters
//! \brief An object that implements NameValuePairs
......
......@@ -38,7 +38,7 @@ struct CRYPTOPP_DLL EC2NPoint
PolynomialMod2 x, y;
};
template class AbstractGroup<EC2NPoint>;
CRYPTOPP_DLL_TEMPLATE_CLASS AbstractGroup<EC2NPoint>;
//! Elliptic Curve over GF(2^n)
class CRYPTOPP_DLL EC2N : public AbstractGroup<EC2NPoint>
......@@ -102,8 +102,8 @@ private:
mutable Point m_R;
};
template class DL_FixedBasePrecomputationImpl<EC2N::Point>;
template class DL_GroupPrecomputation<EC2N::Point>;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_FixedBasePrecomputationImpl<EC2N::Point>;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_GroupPrecomputation<EC2N::Point>;
template <class T> class EcPrecomputation;
......
......@@ -356,20 +356,20 @@ NAMESPACE_END
NAMESPACE_BEGIN(CryptoPP)
template class DL_GroupParameters_EC<ECP>;
template class DL_GroupParameters_EC<EC2N>;
template class DL_PublicKeyImpl<DL_GroupParameters_EC<ECP> >;
template class DL_PublicKeyImpl<DL_GroupParameters_EC<EC2N> >;
template class DL_PublicKey_EC<ECP>;
template class DL_PublicKey_EC<EC2N>;
template class DL_PrivateKeyImpl<DL_GroupParameters_EC<ECP> >;
template class DL_PrivateKeyImpl<DL_GroupParameters_EC<EC2N> >;
template class DL_PrivateKey_EC<ECP>;
template class DL_PrivateKey_EC<EC2N>;
template class DL_Algorithm_GDSA<ECP::Point>;
template class DL_Algorithm_GDSA<EC2N::Point>;
template class DL_PrivateKey_WithSignaturePairwiseConsistencyTest<DL_PrivateKey_EC<ECP>, ECDSA<ECP, SHA256> >;
template class DL_PrivateKey_WithSignaturePairwiseConsistencyTest<DL_PrivateKey_EC<EC2N>, ECDSA<EC2N, SHA256> >;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_GroupParameters_EC<ECP>;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_GroupParameters_EC<EC2N>;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PublicKeyImpl<DL_GroupParameters_EC<ECP> >;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PublicKeyImpl<DL_GroupParameters_EC<EC2N> >;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PublicKey_EC<ECP>;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PublicKey_EC<EC2N>;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKeyImpl<DL_GroupParameters_EC<ECP> >;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKeyImpl<DL_GroupParameters_EC<EC2N> >;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKey_EC<ECP>;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKey_EC<EC2N>;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_Algorithm_GDSA<ECP::Point>;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_Algorithm_GDSA<EC2N::Point>;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKey_WithSignaturePairwiseConsistencyTest<DL_PrivateKey_EC<ECP>, ECDSA<ECP, SHA256> >;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKey_WithSignaturePairwiseConsistencyTest<DL_PrivateKey_EC<EC2N>, ECDSA<EC2N, SHA256> >;
NAMESPACE_END
......
......@@ -36,7 +36,7 @@ struct CRYPTOPP_DLL ECPPoint
Integer x, y;
};
template class AbstractGroup<ECPPoint>;
CRYPTOPP_DLL_TEMPLATE_CLASS AbstractGroup<ECPPoint>;
//! Elliptic Curve over GF(p), where p is prime
class CRYPTOPP_DLL ECP : public AbstractGroup<ECPPoint>
......@@ -104,8 +104,8 @@ private:
mutable Point m_R;
};
template class DL_FixedBasePrecomputationImpl<ECP::Point>;
template class DL_GroupPrecomputation<ECP::Point>;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_FixedBasePrecomputationImpl<ECP::Point>;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_GroupPrecomputation<ECP::Point>;
template <class T> class EcPrecomputation;
......
......@@ -996,7 +996,12 @@ private:
T *m_output;
};
//template class StringSinkTemplate<std::string>;
#ifdef _IOS
template class StringSinkTemplate<std::string>;
#else
CRYPTOPP_DLL_TEMPLATE_CLASS StringSinkTemplate<std::string>;
#endif
DOCUMENTED_TYPEDEF(StringSinkTemplate<std::string>, StringSink);
//! \class RandomNumberSink
......
......@@ -272,11 +272,11 @@ inline CryptoPP::PolynomialMod2 operator%(const CryptoPP::PolynomialMod2 &a, con
// CodeWarrior 8 workaround: put these template instantiations after overloaded operator declarations,
// but before the use of QuotientRing<EuclideanDomainOf<PolynomialMod2> > for VC .NET 2003
template class AbstractGroup<PolynomialMod2>;
template class AbstractRing<PolynomialMod2>;
template class AbstractEuclideanDomain<PolynomialMod2>;
template class EuclideanDomainOf<PolynomialMod2>;
template class QuotientRing<EuclideanDomainOf<PolynomialMod2> >;
CRYPTOPP_DLL_TEMPLATE_CLASS AbstractGroup<PolynomialMod2>;
CRYPTOPP_DLL_TEMPLATE_CLASS AbstractRing<PolynomialMod2>;
CRYPTOPP_DLL_TEMPLATE_CLASS AbstractEuclideanDomain<PolynomialMod2>;
CRYPTOPP_DLL_TEMPLATE_CLASS EuclideanDomainOf<PolynomialMod2>;
CRYPTOPP_DLL_TEMPLATE_CLASS QuotientRing<EuclideanDomainOf<PolynomialMod2> >;
//! GF(2^n) with Polynomial Basis
class CRYPTOPP_DLL GF2NP : public QuotientRing<EuclideanDomainOf<PolynomialMod2> >
......
......@@ -25,7 +25,7 @@
NAMESPACE_BEGIN(CryptoPP)
//template class DL_GroupParameters<Integer>;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_GroupParameters<Integer>;
//! _
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE DL_GroupParameters_IntegerBased : public ASN1CryptoMaterial<DL_GroupParameters<Integer> >
......@@ -138,7 +138,7 @@ public:
#endif
};
//template class DL_GroupParameters_IntegerBasedImpl<ModExpPrecomputation>;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_GroupParameters_IntegerBasedImpl<ModExpPrecomputation>;
//! GF(p) group parameters
class CRYPTOPP_DLL DL_GroupParameters_GFP : public DL_GroupParameters_IntegerBasedImpl<ModExpPrecomputation>
......@@ -214,7 +214,7 @@ public:
#endif
};
//template class DL_Algorithm_GDSA<Integer>;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_Algorithm_GDSA<Integer>;
//! NR algorithm
template <class T>
......@@ -490,9 +490,9 @@ public:
//! DSA with SHA-1, typedef'd for backwards compatibility
typedef DSA2<SHA> DSA;
//template class DL_PublicKey_GFP<DL_GroupParameters_DSA>;
//template class DL_PrivateKey_GFP<DL_GroupParameters_DSA>;
//template class DL_PrivateKey_WithSignaturePairwiseConsistencyTest<DL_PrivateKey_GFP<DL_GroupParameters_DSA>, DSA2<SHA> >;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PublicKey_GFP<DL_GroupParameters_DSA>;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKey_GFP<DL_GroupParameters_DSA>;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKey_WithSignaturePairwiseConsistencyTest<DL_PrivateKey_GFP<DL_GroupParameters_DSA>, DSA2<SHA> >;
//! the XOR encryption method, for use with DL-based cryptosystems
template <class MAC, bool DHAES_MODE>
......
......@@ -175,11 +175,11 @@ protected:
};
#ifndef __GNUC__
// CRYPTOPP_DLL_TEMPLATE_CLASS IteratedHashBase<word64, HashTransformation>;
// CRYPTOPP_STATIC_TEMPLATE_CLASS IteratedHashBase<word64, MessageAuthenticationCode>;
//
// CRYPTOPP_DLL_TEMPLATE_CLASS IteratedHashBase<word32, HashTransformation>;
// CRYPTOPP_STATIC_TEMPLATE_CLASS IteratedHashBase<word32, MessageAuthenticationCode>;
CRYPTOPP_DLL_TEMPLATE_CLASS IteratedHashBase<word64, HashTransformation>;
CRYPTOPP_STATIC_TEMPLATE_CLASS IteratedHashBase<word64, MessageAuthenticationCode>;
CRYPTOPP_DLL_TEMPLATE_CLASS IteratedHashBase<word32, HashTransformation>;
CRYPTOPP_STATIC_TEMPLATE_CLASS IteratedHashBase<word32, MessageAuthenticationCode>;
#endif
NAMESPACE_END
......
......@@ -16,9 +16,15 @@
NAMESPACE_BEGIN(CryptoPP)
template class AbstractGroup<Integer>;
template class AbstractRing<Integer>;
template class AbstractEuclideanDomain<Integer>;
#ifdef _IOS
template class AbstractGroup<Integer>;
template class AbstractRing<Integer>;
template class AbstractEuclideanDomain<Integer>;
#else
CRYPTOPP_DLL_TEMPLATE_CLASS AbstractGroup<Integer>;
CRYPTOPP_DLL_TEMPLATE_CLASS AbstractRing<Integer>;
CRYPTOPP_DLL_TEMPLATE_CLASS AbstractEuclideanDomain<Integer>;
#endif
//! \class ModularArithmetic
//! \brief Ring of congruence classes modulo n
......
......@@ -336,13 +336,11 @@ public:
std::string AlgorithmName() const
{return (this->m_cipher ? this->m_cipher->AlgorithmName() + "/" : std::string("")) + BASE::StaticAlgorithmName();}
virtual void CombineMessageAndShiftRegister(byte *output, byte *reg, const byte *message, size_t length) {}
};
//template class CFB_CipherTemplate<AbstractPolicyHolder<CFB_CipherAbstractPolicy, CFB_ModePolicy> >;
//template class CFB_EncryptionTemplate<AbstractPolicyHolder<CFB_CipherAbstractPolicy, CFB_ModePolicy> >;
//template class CFB_DecryptionTemplate<AbstractPolicyHolder<CFB_CipherAbstractPolicy, CFB_ModePolicy> >;
CRYPTOPP_DLL_TEMPLATE_CLASS CFB_CipherTemplate<AbstractPolicyHolder<CFB_CipherAbstractPolicy, CFB_ModePolicy> >;
CRYPTOPP_DLL_TEMPLATE_CLASS CFB_EncryptionTemplate<AbstractPolicyHolder<CFB_CipherAbstractPolicy, CFB_ModePolicy> >;
CRYPTOPP_DLL_TEMPLATE_CLASS CFB_DecryptionTemplate<AbstractPolicyHolder<CFB_CipherAbstractPolicy, CFB_ModePolicy> >;
//! \class CFB_Mode
//! \brief CFB block cipher mode of operation.
......@@ -380,7 +378,7 @@ struct CFB_FIPS_Mode_ExternalCipher : public CipherModeDocumentation
typedef CipherModeFinalTemplate_ExternalCipher<ConcretePolicyHolder<Empty, CFB_RequireFullDataBlocks<CFB_DecryptionTemplate<AbstractPolicyHolder<CFB_CipherAbstractPolicy, CFB_ModePolicy> > > > > Decryption;
};
//CRYPTOPP_DLL_TEMPLATE_CLASS AdditiveCipherTemplate<AbstractPolicyHolder<AdditiveCipherAbstractPolicy, OFB_ModePolicy> >;
CRYPTOPP_DLL_TEMPLATE_CLASS AdditiveCipherTemplate<AbstractPolicyHolder<AdditiveCipherAbstractPolicy, OFB_ModePolicy> >;
//! \class OFB_Mode
//! \brief OFB block cipher mode of operation.
......@@ -399,8 +397,8 @@ struct OFB_Mode_ExternalCipher : public CipherModeDocumentation
typedef Encryption Decryption;
};
//CRYPTOPP_DLL_TEMPLATE_CLASS AdditiveCipherTemplate<AbstractPolicyHolder<AdditiveCipherAbstractPolicy, CTR_ModePolicy> >;
//CRYPTOPP_DLL_TEMPLATE_CLASS CipherModeFinalTemplate_ExternalCipher<ConcretePolicyHolder<Empty, AdditiveCipherTemplate<AbstractPolicyHolder<AdditiveCipherAbstractPolicy, CTR_ModePolicy> > > >;
CRYPTOPP_DLL_TEMPLATE_CLASS AdditiveCipherTemplate<AbstractPolicyHolder<AdditiveCipherAbstractPolicy, CTR_ModePolicy> >;
CRYPTOPP_DLL_TEMPLATE_CLASS CipherModeFinalTemplate_ExternalCipher<ConcretePolicyHolder<Empty, AdditiveCipherTemplate<AbstractPolicyHolder<AdditiveCipherAbstractPolicy, CTR_ModePolicy> > > >;
//! \class CTR_Mode
//! \brief CTR block cipher mode of operation.
......@@ -428,7 +426,11 @@ struct ECB_Mode : public CipherModeDocumentation
typedef CipherModeFinalTemplate_CipherHolder<CPP_TYPENAME CIPHER::Decryption, ECB_OneWay> Decryption;
};
//template class CipherModeFinalTemplate_ExternalCipher<ECB_OneWay>;
#ifdef _IOS
template class CipherModeFinalTemplate_ExternalCipher<ECB_OneWay>;
#else
CRYPTOPP_DLL_TEMPLATE_CLASS CipherModeFinalTemplate_ExternalCipher<ECB_OneWay>;
#endif
//! \class ECB_Mode_ExternalCipher
//! \brief ECB mode, external cipher.
......@@ -446,8 +448,13 @@ struct CBC_Mode : public CipherModeDocumentation
typedef CipherModeFinalTemplate_CipherHolder<CPP_TYPENAME CIPHER::Decryption, CBC_Decryption> Decryption;
};
//template class CipherModeFinalTemplate_ExternalCipher<CBC_Encryption>;
//template class CipherModeFinalTemplate_ExternalCipher<CBC_Decryption>;
#ifdef _IOS
template class CipherModeFinalTemplate_ExternalCipher<CBC_Encryption>;
template class CipherModeFinalTemplate_ExternalCipher<CBC_Decryption>;
#else
CRYPTOPP_DLL_TEMPLATE_CLASS CipherModeFinalTemplate_ExternalCipher<CBC_Encryption>;
CRYPTOPP_DLL_TEMPLATE_CLASS CipherModeFinalTemplate_ExternalCipher<CBC_Decryption>;
#endif
//! CBC mode, external cipher
struct CBC_Mode_ExternalCipher : public CipherModeDocumentation
......@@ -464,8 +471,8 @@ struct CBC_CTS_Mode : public CipherModeDocumentation
typedef CipherModeFinalTemplate_CipherHolder<CPP_TYPENAME CIPHER::Decryption, CBC_CTS_Decryption> Decryption;
};
template class CipherModeFinalTemplate_ExternalCipher<CBC_CTS_Encryption>;
template class CipherModeFinalTemplate_ExternalCipher<CBC_CTS_Decryption>;
CRYPTOPP_DLL_TEMPLATE_CLASS CipherModeFinalTemplate_ExternalCipher<CBC_CTS_Encryption>;
CRYPTOPP_DLL_TEMPLATE_CLASS CipherModeFinalTemplate_ExternalCipher<CBC_CTS_Decryption>;
//! \class CBC_CTS_Mode_ExternalCipher
//! \brief CBC mode with ciphertext stealing, external cipher
......
......@@ -242,7 +242,7 @@ void AutoSeededX917RNG<BLOCK_CIPHER>::Reseed(bool blocking, const byte *input, s
Reseed(key, BLOCK_CIPHER::DEFAULT_KEYLENGTH, seed, NULL);
}
//CRYPTOPP_DLL_TEMPLATE_CLASS AutoSeededX917RNG<AES>;
CRYPTOPP_DLL_TEMPLATE_CLASS AutoSeededX917RNG<AES>;
#if defined(CRYPTOPP_DOXYGEN_PROCESSING)
//! \class DefaultAutoSeededRNG
......
......@@ -240,15 +240,23 @@ public:
#endif
};
template class AllocatorWithCleanup<byte>;
template class AllocatorWithCleanup<word16>;
template class AllocatorWithCleanup<word32>;
template class AllocatorWithCleanup<word64>;
#ifdef _IOS
template class AllocatorWithCleanup<byte>;
template class AllocatorWithCleanup<word16>;
template class AllocatorWithCleanup<word32>;
template class AllocatorWithCleanup<word64>;
#else
CRYPTOPP_DLL_TEMPLATE_CLASS AllocatorWithCleanup<byte>;
CRYPTOPP_DLL_TEMPLATE_CLASS AllocatorWithCleanup<word16>;
CRYPTOPP_DLL_TEMPLATE_CLASS AllocatorWithCleanup<word32>;
CRYPTOPP_DLL_TEMPLATE_CLASS AllocatorWithCleanup<word64>;
#endif
#if defined(CRYPTOPP_WORD128_AVAILABLE)
template class AllocatorWithCleanup<word128, true>; // for Integer
CRYPTOPP_DLL_TEMPLATE_CLASS AllocatorWithCleanup<word128, true>; // for Integer
#endif
#if CRYPTOPP_BOOL_X86
template class AllocatorWithCleanup<word, true>; // for Integer
CRYPTOPP_DLL_TEMPLATE_CLASS AllocatorWithCleanup<word, true>; // for Integer
#endif
//! \class NullAllocator
......
......@@ -552,7 +552,7 @@ template <class BASE = AbstractPolicyHolder<CFB_CipherAbstractPolicy, SymmetricC
class CRYPTOPP_NO_VTABLE CFB_EncryptionTemplate : public CFB_CipherTemplate<BASE>
{
bool IsForwardTransformation() const {return true;}
virtual void CombineMessageAndShiftRegister(byte *output, byte *reg, const byte *message, size_t length);
void CombineMessageAndShiftRegister(byte *output, byte *reg, const byte *message, size_t length);
};
//! \class CFB_DecryptionTemplate
......@@ -562,7 +562,7 @@ template <class BASE = AbstractPolicyHolder<CFB_CipherAbstractPolicy, SymmetricC
class CRYPTOPP_NO_VTABLE CFB_DecryptionTemplate : public CFB_CipherTemplate<BASE>
{
bool IsForwardTransformation() const {return false;}
virtual void CombineMessageAndShiftRegister(byte *output, byte *reg, const byte *message, size_t length);
void CombineMessageAndShiftRegister(byte *output, byte *reg, const byte *message, size_t length);
};
//! \class CFB_RequireFullDataBlocks
......
......@@ -149,4 +149,4 @@ private:
bool bVerify;
};
}
\ No newline at end of file
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment