From 572fe07633123ce38abf28c6426356e37aef3a99 Mon Sep 17 00:00:00 2001 From: weidai Date: Fri, 4 Jul 2003 00:17:37 +0000 Subject: create DLL version, fix GetNextIV() bug in CTR and OFB modes git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@87 57ff6487-cd31-0410-9ec3-f628ee90f5f0 --- simple.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'simple.h') diff --git a/simple.h b/simple.h index 1727d38..0185a26 100644 --- a/simple.h +++ b/simple.h @@ -11,6 +11,13 @@ NAMESPACE_BEGIN(CryptoPP) +template +class CRYPTOPP_NO_VTABLE ClonableImpl : public BASE +{ +public: + Clonable * Clone() const {return new DERIVED(*static_cast(this));} +}; + template class CRYPTOPP_NO_VTABLE AlgorithmImpl : public BASE { @@ -19,29 +26,22 @@ public: }; //! . -class InvalidKeyLength : public InvalidArgument +class CRYPTOPP_DLL InvalidKeyLength : public InvalidArgument { public: explicit InvalidKeyLength(const std::string &algorithm, unsigned int length) : InvalidArgument(algorithm + ": " + IntToString(length) + " is not a valid key length") {} }; //! . -class InvalidRounds : public InvalidArgument +class CRYPTOPP_DLL InvalidRounds : public InvalidArgument { public: explicit InvalidRounds(const std::string &algorithm, unsigned int rounds) : InvalidArgument(algorithm + ": " + IntToString(rounds) + " is not a valid number of rounds") {} }; -class CRYPTOPP_NO_VTABLE HashTransformationWithDefaultTruncation : public HashTransformation -{ -public: - virtual void Final(byte *digest) =0; - void TruncatedFinal(byte *digest, unsigned int digestSize); -}; - //! . // TODO: look into this virtual inheritance -class ASN1CryptoMaterial : virtual public ASN1Object, virtual public CryptoMaterial +class CRYPTOPP_DLL ASN1CryptoMaterial : virtual public ASN1Object, virtual public CryptoMaterial { public: void Save(BufferedTransformation &bt) const @@ -175,7 +175,7 @@ private: }; //! A BufferedTransformation that only contains pre-existing data as "output" -class CRYPTOPP_NO_VTABLE Store : public AutoSignaling > +class CRYPTOPP_DLL 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 CRYPTOPP_NO_VTABLE Sink : public BufferedTransformation +class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE Sink : public BufferedTransformation { protected: // make these functions protected to help prevent unintentional calls to them @@ -216,7 +216,7 @@ protected: {return 0;} }; -class BitBucket : public Bufferless +class CRYPTOPP_DLL BitBucket : public Bufferless { public: std::string AlgorithmName() const {return "BitBucket";} -- cgit v1.2.1