From 7c32afc0c2a23e39ea7fe3dce9c718c77f758bb7 Mon Sep 17 00:00:00 2001 From: weidai Date: Tue, 19 Nov 2002 20:44:40 +0000 Subject: fixed to compile with Intel compiler git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@17 57ff6487-cd31-0410-9ec3-f628ee90f5f0 --- strciphr.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'strciphr.h') diff --git a/strciphr.h b/strciphr.h index 12fb95e..2a297bb 100644 --- a/strciphr.h +++ b/strciphr.h @@ -36,9 +36,10 @@ NAMESPACE_BEGIN(CryptoPP) template class AbstractPolicyHolder : public BASE { -protected: +public: typedef POLICY_INTERFACE PolicyInterface; +protected: virtual const POLICY_INTERFACE & GetPolicy() const =0; virtual POLICY_INTERFACE & AccessPolicy() =0; }; @@ -130,9 +131,9 @@ public: bool IsRandomAccess() const {return GetPolicy().IsRandomAccess();} void Seek(dword position); -protected: typedef typename BASE::PolicyInterface PolicyInterface; +protected: void UncheckedSetKey(const NameValuePairs ¶ms, const byte *key, unsigned int length); unsigned int GetBufferByteSize(const PolicyInterface &policy) const {return policy.GetBytesPerIteration() * policy.GetIterationsToBuffer();} @@ -220,9 +221,9 @@ public: bool IsRandomAccess() const {return false;} bool IsSelfInverting() const {return false;} -protected: typedef typename BASE::PolicyInterface PolicyInterface; +protected: virtual void CombineMessageAndShiftRegister(byte *output, byte *reg, const byte *message, unsigned int length) =0; void UncheckedSetKey(const NameValuePairs ¶ms, const byte *key, unsigned int length); @@ -262,7 +263,7 @@ public: UncheckedSetKey(params, key, length); } - Clonable * Clone() {return new SymmetricCipherFinalTemplate(*this);} + Clonable * Clone() const {return static_cast(new SymmetricCipherFinalTemplate(*this));} }; template -- cgit v1.2.1