diff -Naur xmule/src/CryptoXMpp.cpp xmule.fixed/src/CryptoXMpp.cpp
--- xmule/src/CryptoXMpp.cpp	2004-05-25 17:06:32.000000000 -0500
+++ xmule.fixed/src/CryptoXMpp.cpp	2004-06-28 10:44:44.370867416 -0500
@@ -115,7 +115,7 @@
             b, a
                 };
         unsigned int i0 = 0, i1 = 1, i2 = 2;
-        while (!Equal(g[i1], Identity()))
+        while (!Equal(g[i1], this->Identity()))
         {
             g[i2] = Mod(g[i0], g[i1]);
             unsigned int t = i0;
@@ -3043,7 +3043,7 @@
         "adc $0, %0;"
         "pop %%ebp;"
         : "=aSD" (carry), "+r" (B), "+r" (C), "+r" (A), "+r" (N), "=r" (temp)
-        :: "cc", "memory");
+        );
         return carry;
     }
     __attribute__((regparm(3))) word PentiumOptimized:: Subtract(word * C, const word * A, const word * B, unsigned int N)
@@ -3074,7 +3074,7 @@
         "adc $0, %0;"
         "pop %%ebp;"
         : "=aSD" (carry), "+r" (B), "+r" (C), "+r" (A), "+r" (N), "=r" (temp)
-        :: "cc", "memory");
+        );
         return carry;
     }
 #endif	// __pic__
@@ -8795,7 +8795,7 @@
 template <class S >
 byte AdditiveCipherTemplate <S >:: GenerateByte()
 {
-    PolicyInterface & policy = AccessPolicy();
+    PolicyInterface & policy = this->AccessPolicy();
     if (m_leftOver == 0)
     {
         policy.WriteKeystream(m_buffer, policy.GetIterationsToBuffer());
@@ -8819,7 +8819,7 @@
     if (!length)
     return;
     assert(m_leftOver == 0);
-    PolicyInterface & policy = AccessPolicy();
+    PolicyInterface & policy = this->AccessPolicy();
     unsigned int bytesPerIteration = policy.GetBytesPerIteration();
     unsigned int alignment = policy.GetAlignment();
     if (policy.CanOperateKeystream() && length >= bytesPerIteration && IsAlignedOn(outString, alignment))
@@ -8858,7 +8858,7 @@
 template <class S >
 void AdditiveCipherTemplate <S >:: Resynchronize(const byte * iv)
 {
-    PolicyInterface & policy = AccessPolicy();
+    PolicyInterface & policy = this->AccessPolicy();
     m_leftOver = 0;
     m_buffer.New(GetBufferByteSize(policy));
     policy.CipherResynchronize(m_buffer, iv);
@@ -8867,7 +8867,7 @@
 template <class BASE >
 void AdditiveCipherTemplate <BASE >:: Seek(dword position)
 {
-    PolicyInterface & policy = AccessPolicy();
+    PolicyInterface & policy = this->AccessPolicy();
     unsigned int bytesPerIteration = policy.GetBytesPerIteration();
     policy.SeekToIteration(position / bytesPerIteration);
     position %= bytesPerIteration;
@@ -8883,7 +8883,7 @@
 template <class BASE >
 void CFB_CipherTemplate <BASE >:: Resynchronize(const byte * iv)
 {
-    PolicyInterface & policy = AccessPolicy();
+    PolicyInterface & policy = this->AccessPolicy();
     policy.CipherResynchronize(iv);
     m_leftOver = policy.GetBytesPerIteration();
 }
@@ -8891,7 +8891,7 @@
 template <class BASE >
 void CFB_CipherTemplate <BASE >:: ProcessData(byte * outString, const byte * inString, unsigned int length)
 {
-    PolicyInterface & policy = AccessPolicy();
+    PolicyInterface & policy = this->AccessPolicy();
     unsigned int bytesPerIteration = policy.GetBytesPerIteration();
     unsigned int alignment = policy.GetAlignment();
     byte * reg = policy.GetRegisterBegin();
diff -Naur xmule/src/CryptoXMpp.h xmule.fixed/src/CryptoXMpp.h
--- xmule/src/CryptoXMpp.h	2004-05-26 12:58:54.000000000 -0500
+++ xmule.fixed/src/CryptoXMpp.h	2004-06-28 10:44:19.448656168 -0500
@@ -2701,7 +2701,7 @@
 	Unflushable() {}
 	Unflushable(BufferedTransformation *q) : T(q) {}
 	bool Flush(bool completeFlush, int propagation=-1, bool blocking=true)
-		{return ChannelFlush(NULL_CHANNEL, completeFlush, propagation);}
+		{return ChannelFlush(this->NULL_CHANNEL, completeFlush, propagation);}
 	bool IsolatedFlush(bool hardFlush, bool blocking)
 		{assert(false); return false;}
 	bool ChannelFlush(const std::string &channel, bool hardFlush, int propagation=-1, bool blocking=true)
@@ -2710,7 +2710,7 @@
 			throw CannotFlush("Unflushable<T>: this object has buffered input that cannot be flushed");
 		else 
 		{
-			BufferedTransformation *attached = AttachedTransformation();
+			BufferedTransformation *attached = this->AttachedTransformation();
 			return attached && propagation ? attached->ChannelFlush(channel, hardFlush, propagation-1, blocking) : false;
 		}
 	}
@@ -2764,24 +2764,24 @@
 	Multichannel(BufferedTransformation *q) : CustomSignalPropagation<T>(q) {}
 
 	void Initialize(const NameValuePairs &parameters, int propagation)
-		{ChannelInitialize(NULL_CHANNEL, parameters, propagation);}
+		{ChannelInitialize(this->NULL_CHANNEL, parameters, propagation);}
 	bool Flush(bool hardFlush, int propagation=-1, bool blocking=true)
-		{return ChannelFlush(NULL_CHANNEL, hardFlush, propagation, blocking);}
+		{return ChannelFlush(this->NULL_CHANNEL, hardFlush, propagation, blocking);}
 	bool MessageSeriesEnd(int propagation=-1, bool blocking=true)
-		{return ChannelMessageSeriesEnd(NULL_CHANNEL, propagation, blocking);}
+		{return ChannelMessageSeriesEnd(this->NULL_CHANNEL, propagation, blocking);}
 	byte * CreatePutSpace(unsigned int &size)
-		{return ChannelCreatePutSpace(NULL_CHANNEL, size);}
+		{return ChannelCreatePutSpace(this->NULL_CHANNEL, size);}
 	unsigned int Put2(const byte *begin, unsigned int length, int messageEnd, bool blocking)
-		{return ChannelPut2(NULL_CHANNEL, begin, length, messageEnd, blocking);}
+		{return ChannelPut2(this->NULL_CHANNEL, begin, length, messageEnd, blocking);}
 	unsigned int PutModifiable2(byte *inString, unsigned int length, int messageEnd, bool blocking)
-		{return ChannelPutModifiable2(NULL_CHANNEL, inString, length, messageEnd, blocking);}
+		{return ChannelPutModifiable2(this->NULL_CHANNEL, inString, length, messageEnd, blocking);}
 
 //	void ChannelMessageSeriesEnd(const std::string &channel, int propagation=-1)
 //		{PropagateMessageSeriesEnd(propagation, channel);}
 	byte * ChannelCreatePutSpace(const std::string &channel, unsigned int &size)
 		{size = 0; return NULL;}
 	bool ChannelPutModifiable(const std::string &channel, byte *inString, unsigned int length)
-		{ChannelPut(channel, inString, length); return false;}
+		{this->ChannelPut(channel, inString, length); return false;}
 
 	virtual unsigned int ChannelPut2(const std::string &channel, const byte *begin, unsigned int length, int messageEnd, bool blocking) =0;
 	unsigned int ChannelPutModifiable2(const std::string &channel, byte *begin, unsigned int length, int messageEnd, bool blocking)
@@ -3604,7 +3604,7 @@
 
 protected:
 	IteratedHash(unsigned int digestSize) : IteratedHashBase2<T, B, BASE>(BLOCKSIZE, digestSize) {}
-	unsigned int BlockSize() const {return BLOCKSIZE;}
+	unsigned int BlockSize() const {return this->BLOCKSIZE;}
 };
 
 template <class T, class B, unsigned int S, class M>
@@ -3612,7 +3612,7 @@
 {
 protected:
 	IteratedHashWithStaticTransform(unsigned int digestSize) : IteratedHash<T, B, S>(digestSize) {}
-	void vTransform(const T *data) {M::Transform(m_digest, data);}
+	void vTransform(const T *data) {M::Transform(this->m_digest, data);}
 	std::string AlgorithmName() const {return M::StaticAlgorithmName();}
 };
 
@@ -3620,17 +3620,17 @@
 
 template <class T, class B, class BASE> void IteratedHashBase2<T, B, BASE>::xmTF(byte *hash, unsigned int size)
 {
-	ThrowIfInvalidTruncatedSize(size);
+	this->ThrowIfInvalidTruncatedSize(size);
 
-	PadLastBlock(BlockSize() - 2*sizeof(HashWordType));
-	CorrectEndianess(m_data, m_data, BlockSize() - 2*sizeof(HashWordType));
-	m_data[m_data.size()-2] = B::ToEnum() ? GetBitCountHi() : GetBitCountLo();
-	m_data[m_data.size()-1] = B::ToEnum() ? GetBitCountLo() : GetBitCountHi();
-
-	vTransform(m_data);
-	CorrectEndianess(m_digest, m_digest, DigestSize());
-	memcpy(hash, m_digest, size);
-	Restart();		// reinit for next use
+	PadLastBlock(this->BlockSize() - 2*sizeof(HashWordType));
+	CorrectEndianess(this->m_data, this->m_data, this->BlockSize() - 2*sizeof(HashWordType));
+	this->m_data[this->m_data.size()-2] = B::ToEnum() ? this->GetBitCountHi() : this->GetBitCountLo();
+	this->m_data[this->m_data.size()-1] = B::ToEnum() ? this->GetBitCountLo() : this->GetBitCountHi();
+
+	vTransform(this->m_data);
+	CorrectEndianess(this->m_digest, this->m_digest, this->DigestSize());
+	memcpy(hash, this->m_digest, size);
+	this->Restart();		// reinit for next use
 }
 
 template <class T, class B, class BASE> void IteratedHashBase2<T, B, BASE>::HashBlock(const HashWordType *input)
@@ -3642,11 +3642,11 @@
 		//faz:450:ByteReverse(m_data.begin(), input, BlockSize());
 	//faz:443:ByteReverse(out, in, byteCount);
 		if(sizeof(T)) {
-			unsigned int count = BlockSize()/sizeof(T);
+			unsigned int count = this->BlockSize()/sizeof(T);
 			for (unsigned int i=0; i<count; i++) {
-				m_data.begin()[i] = ByteReverse(input[i]);
+				this->m_data.begin()[i] = ByteReverse(input[i]);
 			}
-			vTransform(m_data);
+			vTransform(this->m_data);
 		} else {
 			vTransform(input);
 		}
@@ -3725,14 +3725,14 @@
 	value_ptr<T>& operator=(const value_ptr<T>& rhs);
 	bool operator==(const value_ptr<T>& rhs)
 	{
-		return (!m_p && !rhs.m_p) || (m_p && rhs.m_p && *m_p == *rhs.m_p);
+		return (!this->m_p && !rhs.m_p) || (this->m_p && rhs.m_p && *this->m_p == *rhs.m_p);
 	}
 };
 
 template <class T> value_ptr<T>& value_ptr<T>::operator=(const value_ptr<T>& rhs)
 {
-	T *old_p = m_p;
-	m_p = rhs.m_p ? new T(*rhs.m_p) : NULL;
+	T *old_p = this->m_p;
+	this->m_p = rhs.m_p ? new T(*rhs.m_p) : NULL;
 	delete old_p;
 	return *this;
 }
@@ -3752,8 +3752,8 @@
 
 template <class T> clonable_ptr<T>& clonable_ptr<T>::operator=(const clonable_ptr<T>& rhs)
 {
-	T *old_p = m_p;
-	m_p = rhs.m_p ? rhs.m_p->Clone() : NULL;
+	T *old_p = this->m_p;
+	this->m_p = rhs.m_p ? rhs.m_p->Clone() : NULL;
 	delete old_p;
 	return *this;
 }
@@ -5148,8 +5148,8 @@
 	}
 	void DEREncode(BufferedTransformation &out)
 	{
-		if (get() != NULL)
-			get()->DEREncode(out);
+		if (this->get() != NULL)
+			this->get()->DEREncode(out);
 	}
 };
 
@@ -6279,12 +6279,12 @@
 class TF_CryptoSystemBase : public INTERFACE, protected BASE
 {
 public:
-	unsigned int FixedMaxPlaintextLength() const {return GetMessageEncodingInterface().MaxUnpaddedLength(PaddedBlockBitLength());}
-	unsigned int FixedCiphertextLength() const {return GetTrapdoorFunctionBounds().MaxImage().ByteCount();}
+	unsigned int FixedMaxPlaintextLength() const {return this->GetMessageEncodingInterface().MaxUnpaddedLength(PaddedBlockBitLength());}
+	unsigned int FixedCiphertextLength() const {return this->GetTrapdoorFunctionBounds().MaxImage().ByteCount();}
 
 protected:
 	unsigned int PaddedBlockByteLength() const {return BitsToBytes(PaddedBlockBitLength());}
-	unsigned int PaddedBlockBitLength() const {return GetTrapdoorFunctionBounds().PreimageBound().BitCount()-1;}
+	unsigned int PaddedBlockBitLength() const {return this->GetTrapdoorFunctionBounds().PreimageBound().BitCount()-1;}
 };
 
 //! .
@@ -6399,35 +6399,36 @@
 class PK_MessageAccumulatorImpl : public PK_MessageAccumulatorBase, protected ObjectHolder<HASH_ALGORITHM>
 {
 public:
-	HashTransformation & AccessHash() {return m_object;}
+	HashTransformation & AccessHash() {return this->m_object;}
 };
 
 //! .
 template <class INTERFACE, class BASE>
 class TF_SignatureSchemeBase : public INTERFACE, protected BASE
 {
-public:
+ public:
 	unsigned int SignatureLength() const 
-		{return GetTrapdoorFunctionBounds().MaxPreimage().ByteCount();}
+		{return this->GetTrapdoorFunctionBounds().MaxPreimage().ByteCount();}
 	unsigned int MaxRecoverableLength() const 
-		{return GetMessageEncodingInterface().MaxRecoverableLength(MessageRepresentativeBitLength(), GetHashIdentifier().second, GetDigestSize());}
+		{return this->GetMessageEncodingInterface().MaxRecoverableLength(MessageRepresentativeBitLength(), GetHashIdentifier().second, GetDigestSize());}
 	unsigned int MaxRecoverableLengthFromSignatureLength(unsigned int signatureLength) const
 		{return MaxRecoverableLength();}
 
 	bool IsProbabilistic() const 
-		{return GetTrapdoorFunctionInterface().IsRandomized() || GetMessageEncodingInterface().IsProbabilistic();}
+		{return this->GetTrapdoorFunctionInterface().IsRandomized() || this->GetMessageEncodingInterface().IsProbabilistic();}
 	bool AllowNonrecoverablePart() const 
-		{return GetMessageEncodingInterface().AllowNonrecoverablePart();}
+		{return this->GetMessageEncodingInterface().AllowNonrecoverablePart();}
 	bool RecoverablePartFirst() const 
-		{return GetMessageEncodingInterface().RecoverablePartFirst();}
+		{return this->GetMessageEncodingInterface().RecoverablePartFirst();}
 
 protected:
 	unsigned int MessageRepresentativeLength() const {return BitsToBytes(MessageRepresentativeBitLength());}
-	unsigned int MessageRepresentativeBitLength() const {return GetTrapdoorFunctionBounds().ImageBound().BitCount()-1;}
+	unsigned int MessageRepresentativeBitLength() const {return this->GetTrapdoorFunctionBounds().ImageBound().BitCount()-1;}
 	virtual HashIdentifier GetHashIdentifier() const =0;
 	virtual unsigned int GetDigestSize() const =0;
 };
 
+
 //! .
 class TF_SignerBase : public TF_SignatureSchemeBase<PK_Signer, TF_Base<RandomizedTrapdoorFunctionInverse, PK_SignatureMessageEncodingMethod> >
 {
@@ -6511,7 +6512,7 @@
 	// for signature scheme
 	HashIdentifier GetHashIdentifier() const
 	{
-		typedef CPP_TYPENAME SchemeOptions::MessageEncodingMethod::HashIdentifierLookup::HashIdentifierLookup2<CPP_TYPENAME SchemeOptions::HashFunction> L;
+		typedef CPP_TYPENAME SchemeOptions::MessageEncodingMethod::HashIdentifierLookup::template HashIdentifierLookup2<CPP_TYPENAME SchemeOptions::HashFunction> L;
 		return L::Lookup();
 	}
 	unsigned int GetDigestSize() const
@@ -6556,7 +6557,7 @@
 class TF_PublicObjectImpl : public TF_ObjectImpl<BASE, SCHEME_OPTIONS, typename SCHEME_OPTIONS::PublicKey>, public PublicKeyCopier<SCHEME_OPTIONS>
 {
 public:
-	void CopyKeyInto(typename SCHEME_OPTIONS::PublicKey &key) const {key = GetKey();}
+	void CopyKeyInto(typename SCHEME_OPTIONS::PublicKey &key) const {key = this->GetKey();}
 };
 
 //! .
@@ -6564,8 +6565,8 @@
 class TF_PrivateObjectImpl : public TF_ObjectImpl<BASE, SCHEME_OPTIONS, typename SCHEME_OPTIONS::PrivateKey>, public PrivateKeyCopier<SCHEME_OPTIONS>
 {
 public:
-	void CopyKeyInto(typename SCHEME_OPTIONS::PrivateKey &key) const {key = GetKey();}
-	void CopyKeyInto(typename SCHEME_OPTIONS::PublicKey &key) const {key = GetKey();}
+	void CopyKeyInto(typename SCHEME_OPTIONS::PrivateKey &key) const {key = this->GetKey();}
+	void CopyKeyInto(typename SCHEME_OPTIONS::PublicKey &key) const {key = this->GetKey();}
 };
 
 //! .
@@ -6756,8 +6757,8 @@
 	typedef BASE_PRECOMP BasePrecomputation;
 	
 	const DL_GroupPrecomputation<Element> & GetGroupPrecomputation() const {return m_groupPrecomputation;}
-	const DL_FixedBasePrecomputation<Element> & GetBasePrecomputation() const {return m_gpc;}
-	DL_FixedBasePrecomputation<Element> & AccessBasePrecomputation() {return m_gpc;}
+	const DL_FixedBasePrecomputation<Element> & GetBasePrecomputation() const {return this->m_gpc;}
+	DL_FixedBasePrecomputation<Element> & AccessBasePrecomputation() {return this->m_gpc;}
 
 protected:
 	GROUP_PRECOMP m_groupPrecomputation;
@@ -6784,23 +6785,23 @@
 
 	bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const
 	{
-		return GetValueHelper(this, name, valueType, pValue, &GetAbstractGroupParameters())
+		return GetValueHelper(this, name, valueType, pValue, &this->GetAbstractGroupParameters())
 				CRYPTOPP_GET_FUNCTION_ENTRY(PublicElement);
 	}
 
 	void AssignFrom(const NameValuePairs &source);
 	
 	// non-inherited
-	virtual const Element & GetPublicElement() const {return GetPublicPrecomputation().GetBase(GetAbstractGroupParameters().GetGroupPrecomputation());}
-	virtual void SetPublicElement(const Element &y) {AccessPublicPrecomputation().SetBase(GetAbstractGroupParameters().GetGroupPrecomputation(), y);}
+	virtual const Element & GetPublicElement() const {return this->GetPublicPrecomputation().GetBase(this->GetAbstractGroupParameters().GetGroupPrecomputation());}
+	virtual void SetPublicElement(const Element &y) {AccessPublicPrecomputation().SetBase(this->GetAbstractGroupParameters().GetGroupPrecomputation(), y);}
 	virtual Element ExponentiatePublicElement(const Integer &exponent) const
 	{
-		const DL_GroupParameters<T> &params = GetAbstractGroupParameters();
+		const DL_GroupParameters<T> &params = this->GetAbstractGroupParameters();
 		return GetPublicPrecomputation().Exponentiate(params.GetGroupPrecomputation(), exponent);
 	}
 	virtual Element CascadeExponentiateBaseAndPublicElement(const Integer &baseExp, const Integer &publicExp) const
 	{
-		const DL_GroupParameters<T> &params = GetAbstractGroupParameters();
+		const DL_GroupParameters<T> &params = this->GetAbstractGroupParameters();
 		return params.GetBasePrecomputation().CascadeExponentiate(params.GetGroupPrecomputation(), baseExp, GetPublicPrecomputation(), publicExp);
 	}
 
@@ -6819,19 +6820,19 @@
 
 	void MakePublicKey(DL_PublicKey<T> &pub) const
 	{
-		pub.AccessAbstractGroupParameters().AssignFrom(GetAbstractGroupParameters());
-		pub.SetPublicElement(GetAbstractGroupParameters().ExponentiateBase(GetPrivateExponent()));
+		pub.AccessAbstractGroupParameters().AssignFrom(this->GetAbstractGroupParameters());
+		pub.SetPublicElement(this->GetAbstractGroupParameters().ExponentiateBase(GetPrivateExponent()));
 	}
 
 	bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const
 	{
-		return GetValueHelper(this, name, valueType, pValue, &GetAbstractGroupParameters())
+		return GetValueHelper(this, name, valueType, pValue, &this->GetAbstractGroupParameters())
 				CRYPTOPP_GET_FUNCTION_ENTRY(PrivateExponent);
 	}
 
 	void AssignFrom(const NameValuePairs &source)
 	{
-		AccessAbstractGroupParameters().AssignFrom(source);
+		this->AccessAbstractGroupParameters().AssignFrom(source);
 		AssignFromHelper(this, source)
 			CRYPTOPP_SET_FUNCTION_ENTRY(PrivateExponent);
 	}
@@ -6848,7 +6849,7 @@
 		pPrivateKey->MakePublicKey(*this);
 	else
 	{
-		AccessAbstractGroupParameters().AssignFrom(source);
+		this->AccessAbstractGroupParameters().AssignFrom(source);
 		AssignFromHelper(this, source)
 			CRYPTOPP_SET_FUNCTION_ENTRY(PublicElement);
 	}
@@ -6916,8 +6917,8 @@
 
 	void GenerateRandom(RandomNumberGenerator &rng, const NameValuePairs &params)
 	{
-		if (!params.GetThisObject(AccessGroupParameters()))
-			AccessGroupParameters().GenerateRandom(rng, params);
+		if (!params.GetThisObject(this->AccessGroupParameters()))
+			this->AccessGroupParameters().GenerateRandom(rng, params);
 //		std::pair<const byte *, int> seed;
 		Integer x(rng, Integer::One(), GetAbstractGroupParameters().GetMaxExponent());
 //			Integer::ANY, Integer::Zero(), Integer::One(),
@@ -6937,8 +6938,8 @@
 		{GetAbstractGroupParameters().SavePrecomputation(storedPrecomputation);}
 
 	// DL_Key
-	const DL_GroupParameters<Element> & GetAbstractGroupParameters() const {return GetGroupParameters();}
-	DL_GroupParameters<Element> & AccessAbstractGroupParameters() {return AccessGroupParameters();}
+	const DL_GroupParameters<Element> & GetAbstractGroupParameters() const {return this->GetGroupParameters();}
+	DL_GroupParameters<Element> & AccessAbstractGroupParameters() {return this->AccessGroupParameters();}
 
 	// DL_PrivateKey
 	const Integer & GetPrivateExponent() const {return m_x;}
@@ -6983,7 +6984,7 @@
 	bool Validate(RandomNumberGenerator &rng, unsigned int level) const
 	{
 		bool pass = GetAbstractGroupParameters().Validate(rng, level);
-		pass = pass && GetAbstractGroupParameters().ValidateElement(level, GetPublicElement(), &GetPublicPrecomputation());
+		pass = pass && GetAbstractGroupParameters().ValidateElement(level, this->GetPublicElement(), &GetPublicPrecomputation());
 		return pass;
 	}
 
@@ -7018,8 +7019,8 @@
 	}
 
 	// DL_Key
-	const DL_GroupParameters<Element> & GetAbstractGroupParameters() const {return GetGroupParameters();}
-	DL_GroupParameters<Element> & AccessAbstractGroupParameters() {return AccessGroupParameters();}
+	const DL_GroupParameters<Element> & GetAbstractGroupParameters() const {return this->GetGroupParameters();}
+	DL_GroupParameters<Element> & AccessAbstractGroupParameters() {return this->AccessGroupParameters();}
 
 	// DL_PublicKey
 	const DL_FixedBasePrecomputation<Element> & GetPublicPrecomputation() const {return m_ypc;}
@@ -7027,7 +7028,7 @@
 
 	// non-inherited
 	bool operator==(const DL_PublicKeyImpl<GP> &rhs) const
-		{return GetGroupParameters() == rhs.GetGroupParameters() && GetPublicElement() == rhs.GetPublicElement();}
+		{return this->GetGroupParameters() == rhs.GetGroupParameters() && this->GetPublicElement() == rhs.GetPublicElement();}
 
 private:
 	typename GP::BasePrecomputation m_ypc;
@@ -7101,8 +7102,8 @@
 public:
 	unsigned int SignatureLength() const
 	{
-		return GetSignatureAlgorithm().RLen(GetAbstractGroupParameters())
-			+ GetSignatureAlgorithm().SLen(GetAbstractGroupParameters());
+		return GetSignatureAlgorithm().RLen(this->GetAbstractGroupParameters())
+			+ GetSignatureAlgorithm().SLen(this->GetAbstractGroupParameters());
 	}
 	unsigned int MaxRecoverableLength() const 
 		{return GetMessageEncodingInterface().MaxRecoverableLength(0, GetHashIdentifier().second, GetDigestSize());}
@@ -7118,7 +7119,7 @@
 
 protected:
 	unsigned int MessageRepresentativeLength() const {return BitsToBytes(MessageRepresentativeBitLength());}
-	unsigned int MessageRepresentativeBitLength() const {return GetAbstractGroupParameters().GetSubgroupOrder().BitCount();}
+	unsigned int MessageRepresentativeBitLength() const {return this->GetAbstractGroupParameters().GetSubgroupOrder().BitCount();}
 
 	virtual const DL_ElgamalLikeSignatureAlgorithm<CPP_TYPENAME KEY_INTERFACE::Element> & GetSignatureAlgorithm() const =0;
 	virtual const PK_SignatureMessageEncodingMethod & GetMessageEncodingInterface() const =0;
@@ -7134,9 +7135,9 @@
 	// for validation testing
 	void RawSign(const Integer &k, const Integer &e, Integer &r, Integer &s) const
 	{
-		const DL_ElgamalLikeSignatureAlgorithm<T> &alg = GetSignatureAlgorithm();
-		const DL_GroupParameters<T> &params = GetAbstractGroupParameters();
-		const DL_PrivateKey<T> &key = GetKeyInterface();
+		const DL_ElgamalLikeSignatureAlgorithm<T> &alg = this->GetSignatureAlgorithm();
+		const DL_GroupParameters<T> &params = this->GetAbstractGroupParameters();
+		const DL_PrivateKey<T> &key = this->GetKeyInterface();  
 
 		r = params.ConvertElementToInteger(params.ExponentiateBase(k));
 		alg.Sign(params, key.GetPrivateExponent(), k, e, r, s);
@@ -7144,24 +7145,24 @@
 
 	unsigned int SignAndRestart(RandomNumberGenerator &rng, PK_MessageAccumulator &messageAccumulator, byte *signature, bool restart) const
 	{
-		GetMaterial().DoQuickSanityCheck();
+		this->GetMaterial().DoQuickSanityCheck();
 
 		PK_MessageAccumulatorBase &ma = static_cast<PK_MessageAccumulatorBase &>(messageAccumulator);
-		const DL_ElgamalLikeSignatureAlgorithm<T> &alg = GetSignatureAlgorithm();
-		const DL_GroupParameters<T> &params = GetAbstractGroupParameters();
-		const DL_PrivateKey<T> &key = GetKeyInterface();
+		const DL_ElgamalLikeSignatureAlgorithm<T> &alg = this->GetSignatureAlgorithm();
+		const DL_GroupParameters<T> &params = this->GetAbstractGroupParameters();
+		const DL_PrivateKey<T> &key = this->GetKeyInterface();
 
-		SecByteBlock representative(MessageRepresentativeLength());
-		GetMessageEncodingInterface().xmCMR(
+		SecByteBlock representative(this->MessageRepresentativeLength());
+		this->GetMessageEncodingInterface().ComputeMessageRepresentative(
 			rng, 
 			ma.m_recoverableMessage, ma.m_recoverableMessage.size(), 
-			ma.AccessHash(), GetHashIdentifier(), ma.m_empty, 
-			representative, MessageRepresentativeBitLength());
+			ma.AccessHash(), this->GetHashIdentifier(), ma.m_empty, 
+			representative, this->MessageRepresentativeBitLength());
 		ma.m_empty = true;
 		Integer e(representative, representative.size());
 
 		Integer r;
-		if (MaxRecoverableLength() > 0)
+		if (this->MaxRecoverableLength() > 0)
 			r.Decode(ma.m_semisignature, ma.m_semisignature.size());
 		else
 			r.Decode(ma.m_presignature, ma.m_presignature.size());
@@ -7175,14 +7176,14 @@
 		if (restart)
 			RestartMessageAccumulator(rng, ma);
 
-		return SignatureLength();
+		return this->SignatureLength();
 	}
 
 protected:
 	void RestartMessageAccumulator(RandomNumberGenerator &rng, PK_MessageAccumulatorBase &ma) const
 	{
-		const DL_ElgamalLikeSignatureAlgorithm<T> &alg = GetSignatureAlgorithm();
-		const DL_GroupParameters<T> &params = GetAbstractGroupParameters();
+		const DL_ElgamalLikeSignatureAlgorithm<T> &alg = this->GetSignatureAlgorithm();
+		const DL_GroupParameters<T> &params = this->GetAbstractGroupParameters();
 		ma.m_k.Randomize(rng, 1, params.GetSubgroupOrder()-1);
 		ma.m_presignature.New(params.GetEncodedElementSize(false));
 		params.ConvertElementToInteger(params.ExponentiateBase(ma.m_k)).Encode(ma.m_presignature, ma.m_presignature.size());
@@ -7197,29 +7198,29 @@
 	void InputSignature(PK_MessageAccumulator &messageAccumulator, const byte *signature, unsigned int signatureLength) const
 	{
 		PK_MessageAccumulatorBase &ma = static_cast<PK_MessageAccumulatorBase &>(messageAccumulator);
-		const DL_ElgamalLikeSignatureAlgorithm<T> &alg = GetSignatureAlgorithm();
-		const DL_GroupParameters<T> &params = GetAbstractGroupParameters();
+		const DL_ElgamalLikeSignatureAlgorithm<T> &alg = this->GetSignatureAlgorithm();
+		const DL_GroupParameters<T> &params = this->GetAbstractGroupParameters();
 
 		unsigned int rLen = alg.RLen(params);
 		ma.m_semisignature.Assign(signature, rLen);
 		ma.m_s.Decode(signature+rLen, alg.SLen(params));
 
-		GetMessageEncodingInterface().ProcessSemisignature(ma.AccessHash(), ma.m_semisignature, ma.m_semisignature.size());
+		this->GetMessageEncodingInterface().ProcessSemisignature(ma.AccessHash(), ma.m_semisignature, ma.m_semisignature.size());
 	}
 	
 	bool VerifyAndRestart(PK_MessageAccumulator &messageAccumulator) const
 	{
-		GetMaterial().DoQuickSanityCheck();
+		this->GetMaterial().DoQuickSanityCheck();
 
 		PK_MessageAccumulatorBase &ma = static_cast<PK_MessageAccumulatorBase &>(messageAccumulator);
-		const DL_ElgamalLikeSignatureAlgorithm<T> &alg = GetSignatureAlgorithm();
-		const DL_GroupParameters<T> &params = GetAbstractGroupParameters();
-		const DL_PublicKey<T> &key = GetKeyInterface();
-
-		SecByteBlock representative(MessageRepresentativeLength());
-		GetMessageEncodingInterface().xmCMR(NullRNG(), ma.m_recoverableMessage, ma.m_recoverableMessage.size(), 
-			ma.AccessHash(), GetHashIdentifier(), ma.m_empty,
-			representative, MessageRepresentativeBitLength());
+		const DL_ElgamalLikeSignatureAlgorithm<T> &alg = this->GetSignatureAlgorithm();
+		const DL_GroupParameters<T> &params = this->GetAbstractGroupParameters();
+		const DL_PublicKey<T> &key = this->GetKeyInterface();
+
+		SecByteBlock representative(this->MessageRepresentativeLength());
+		this->GetMessageEncodingInterface().ComputeMessageRepresentative(NullRNG(), ma.m_recoverableMessage, ma.m_recoverableMessage.size(), 
+			ma.AccessHash(), this->GetHashIdentifier(), ma.m_empty,
+			representative, this->MessageRepresentativeBitLength());
 		ma.m_empty = true;
 		Integer e(representative, representative.size());
 
@@ -7229,19 +7230,19 @@
 
 	DecodingResult RecoverAndRestart(byte *recoveredMessage, PK_MessageAccumulator &messageAccumulator) const
 	{
-		GetMaterial().DoQuickSanityCheck();
+		this->GetMaterial().DoQuickSanityCheck();
 
 		PK_MessageAccumulatorBase &ma = static_cast<PK_MessageAccumulatorBase &>(messageAccumulator);
-		const DL_ElgamalLikeSignatureAlgorithm<T> &alg = GetSignatureAlgorithm();
-		const DL_GroupParameters<T> &params = GetAbstractGroupParameters();
-		const DL_PublicKey<T> &key = GetKeyInterface();
+		const DL_ElgamalLikeSignatureAlgorithm<T> &alg = this->GetSignatureAlgorithm();
+		const DL_GroupParameters<T> &params = this->GetAbstractGroupParameters();
+		const DL_PublicKey<T> &key = this->GetKeyInterface();
 
-		SecByteBlock representative(MessageRepresentativeLength());
-		GetMessageEncodingInterface().xmCMR(
+		SecByteBlock representative(this->MessageRepresentativeLength());
+		this->GetMessageEncodingInterface().ComputeMessageRepresentative(
 			NullRNG(), 
 			ma.m_recoverableMessage, ma.m_recoverableMessage.size(), 
-			ma.AccessHash(), GetHashIdentifier(), ma.m_empty,
-			representative, MessageRepresentativeBitLength());
+			ma.AccessHash(), this->GetHashIdentifier(), ma.m_empty,
+			representative, this->MessageRepresentativeBitLength());
 		ma.m_empty = true;
 		Integer e(representative, representative.size());
 
@@ -7249,8 +7250,8 @@
 		Integer r(ma.m_semisignature, ma.m_semisignature.size());
 		alg.RecoverPresignature(params, key, r, ma.m_s).Encode(ma.m_presignature, ma.m_presignature.size());
 
-		return GetMessageEncodingInterface().RecoverMessageFromSemisignature(
-			ma.AccessHash(), GetHashIdentifier(),
+		return this->GetMessageEncodingInterface().RecoverMessageFromSemisignature(
+			ma.AccessHash(), this->GetHashIdentifier(),
 			ma.m_presignature, ma.m_presignature.size(),
 			ma.m_semisignature, ma.m_semisignature.size(),
 			recoveredMessage);
@@ -7266,14 +7267,14 @@
 
 	unsigned int MaxPlaintextLength(unsigned int cipherTextLength) const
 	{
-		unsigned int minLen = GetAbstractGroupParameters().GetEncodedElementSize(true);
+		unsigned int minLen = this->GetAbstractGroupParameters().GetEncodedElementSize(true);
 		return cipherTextLength < minLen ? 0 : GetSymmetricEncryptionAlgorithm().GetMaxSymmetricPlaintextLength(cipherTextLength - minLen);
 	}
 
 	unsigned int CiphertextLength(unsigned int plainTextLength) const
 	{
 		unsigned int len = GetSymmetricEncryptionAlgorithm().GetSymmetricCiphertextLength(plainTextLength);
-		return len == 0 ? 0 : GetAbstractGroupParameters().GetEncodedElementSize(true) + len;
+		return len == 0 ? 0 : this->GetAbstractGroupParameters().GetEncodedElementSize(true) + len;
 	}
 
 protected:
@@ -7293,11 +7294,11 @@
 	{
 		try
 		{
-			const DL_KeyAgreementAlgorithm<T> &agreeAlg = GetKeyAgreementAlgorithm();
-			const DL_KeyDerivationAlgorithm<T> &derivAlg = GetKeyDerivationAlgorithm();
-			const DL_SymmetricEncryptionAlgorithm &encAlg = GetSymmetricEncryptionAlgorithm();
-			const DL_GroupParameters<T> &params = GetAbstractGroupParameters();
-			const DL_PrivateKey<T> &key = GetKeyInterface();
+			const DL_KeyAgreementAlgorithm<T> &agreeAlg = this->GetKeyAgreementAlgorithm();
+			const DL_KeyDerivationAlgorithm<T> &derivAlg = this->GetKeyDerivationAlgorithm();
+			const DL_SymmetricEncryptionAlgorithm &encAlg = this->GetSymmetricEncryptionAlgorithm();
+			const DL_GroupParameters<T> &params = this->GetAbstractGroupParameters();
+			const DL_PrivateKey<T> &key = this->GetKeyInterface();
 
 			Element q = params.DecodeElement(cipherText, true);
 			unsigned int elementSize = params.GetEncodedElementSize(true);
@@ -7327,11 +7328,11 @@
 
 	void Encrypt(RandomNumberGenerator &rng, const byte *plainText, unsigned int plainTextLength, byte *cipherText) const
 	{
-		const DL_KeyAgreementAlgorithm<T> &agreeAlg = GetKeyAgreementAlgorithm();
-		const DL_KeyDerivationAlgorithm<T> &derivAlg = GetKeyDerivationAlgorithm();
-		const DL_SymmetricEncryptionAlgorithm &encAlg = GetSymmetricEncryptionAlgorithm();
-		const DL_GroupParameters<T> &params = GetAbstractGroupParameters();
-		const DL_PublicKey<T> &key = GetKeyInterface();
+		const DL_KeyAgreementAlgorithm<T> &agreeAlg = this->GetKeyAgreementAlgorithm();
+		const DL_KeyDerivationAlgorithm<T> &derivAlg = this->GetKeyDerivationAlgorithm();
+		const DL_SymmetricEncryptionAlgorithm &encAlg = this->GetSymmetricEncryptionAlgorithm();
+		const DL_GroupParameters<T> &params = this->GetAbstractGroupParameters();
+		const DL_PublicKey<T> &key = this->GetKeyInterface();
 
 		Integer x(rng, Integer::One(), params.GetMaxExponent());
 		Element q = params.ExponentiateBase(x);
@@ -7407,7 +7408,7 @@
 	// for signature scheme
 	HashIdentifier GetHashIdentifier() const
 	{
-		typedef CPP_TYPENAME SchemeOptions::MessageEncodingMethod::HashIdentifierLookup::HashIdentifierLookup2<CPP_TYPENAME SchemeOptions::HashFunction> L;
+		typedef CPP_TYPENAME SchemeOptions::MessageEncodingMethod::HashIdentifierLookup::template HashIdentifierLookup2<CPP_TYPENAME SchemeOptions::HashFunction> L;
 		return L::Lookup();
 	}
 	unsigned int GetDigestSize() const
@@ -7448,7 +7449,7 @@
 {
 public:
 	void CopyKeyInto(typename SCHEME_OPTIONS::PublicKey &key) const
-		{key = GetKey();}
+		{key = this->GetKey();}
 };
 
 //! .
@@ -7457,9 +7458,9 @@
 {
 public:
 	void CopyKeyInto(typename SCHEME_OPTIONS::PublicKey &key) const
-		{GetKey().MakePublicKey(key);}
+		{this->GetKey().MakePublicKey(key);}
 	void CopyKeyInto(typename SCHEME_OPTIONS::PrivateKey &key) const
-		{key = GetKey();}
+		{key = this->GetKey();}
 };
 
 //! .
@@ -7469,7 +7470,7 @@
 	PK_MessageAccumulator * NewSignatureAccumulator(RandomNumberGenerator &rng = NullRNG()) const
 	{
 		std::auto_ptr<PK_MessageAccumulatorBase> p(new PK_MessageAccumulatorImpl<CPP_TYPENAME SCHEME_OPTIONS::HashFunction>);
-		RestartMessageAccumulator(rng, *p);
+		this->RestartMessageAccumulator(rng, *p);
 		return p.release();
 	}
 };
@@ -7618,75 +7619,75 @@
 	PK_FinalTemplate() {}
 
 	PK_FinalTemplate(const Integer &v1)
-		{AccessKey().Initialize(v1);}
+		{this->AccessKey().Initialize(v1);}
 
-	PK_FinalTemplate(const typename BASE::KeyClass &key)  {AccessKey().operator=(key);}
+	PK_FinalTemplate(const typename BASE::KeyClass &key)  {this->AccessKey().operator=(key);}
 
 	template <class T>
 	PK_FinalTemplate(const PublicKeyCopier<T> &key)
-		{key.CopyKeyInto(AccessKey());}
+		{key.CopyKeyInto(this->AccessKey());}
 
 	template <class T>
 	PK_FinalTemplate(const PrivateKeyCopier<T> &key)
-		{key.CopyKeyInto(AccessKey());}
+		{key.CopyKeyInto(this->AccessKey());}
 
-	PK_FinalTemplate(BufferedTransformation &bt) {AccessKey().BERDecode(bt);}
+	PK_FinalTemplate(BufferedTransformation &bt) {this->AccessKey().BERDecode(bt);}
 
 	template <class T1, class T2>
 	PK_FinalTemplate(const T1 &v1, const T2 &v2)
-		{AccessKey().Initialize(v1, v2);}
+		{this->AccessKey().Initialize(v1, v2);}
 
 	template <class T1, class T2, class T3>
 	PK_FinalTemplate(const T1 &v1, const T2 &v2, const T3 &v3)
-		{AccessKey().Initialize(v1, v2, v3);}
+		{this->AccessKey().Initialize(v1, v2, v3);}
 	
 	template <class T1, class T2, class T3, class T4>
 	PK_FinalTemplate(const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4)
-		{AccessKey().Initialize(v1, v2, v3, v4);}
+		{this->AccessKey().Initialize(v1, v2, v3, v4);}
 
 	template <class T1, class T2, class T3, class T4, class T5>
 	PK_FinalTemplate(const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5)
-		{AccessKey().Initialize(v1, v2, v3, v4, v5);}
+		{this->AccessKey().Initialize(v1, v2, v3, v4, v5);}
 
 	template <class T1, class T2, class T3, class T4, class T5, class T6>
 	PK_FinalTemplate(const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5, const T6 &v6)
-		{AccessKey().Initialize(v1, v2, v3, v4, v5, v6);}
+		{this->AccessKey().Initialize(v1, v2, v3, v4, v5, v6);}
 
 	template <class T1, class T2, class T3, class T4, class T5, class T6, class T7>
 	PK_FinalTemplate(const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5, const T6 &v6, const T7 &v7)
-		{AccessKey().Initialize(v1, v2, v3, v4, v5, v6, v7);}
+		{this->AccessKey().Initialize(v1, v2, v3, v4, v5, v6, v7);}
 
 	template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
 	PK_FinalTemplate(const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5, const T6 &v6, const T7 &v7, const T8 &v8)
-		{AccessKey().Initialize(v1, v2, v3, v4, v5, v6, v7, v8);}
+		{this->AccessKey().Initialize(v1, v2, v3, v4, v5, v6, v7, v8);}
 
 	template <class T1, class T2>
 	PK_FinalTemplate(T1 &v1, const T2 &v2)
-		{AccessKey().Initialize(v1, v2);}
+		{this->AccessKey().Initialize(v1, v2);}
 
 	template <class T1, class T2, class T3>
 	PK_FinalTemplate(T1 &v1, const T2 &v2, const T3 &v3)
-		{AccessKey().Initialize(v1, v2, v3);}
+		{this->AccessKey().Initialize(v1, v2, v3);}
 	
 	template <class T1, class T2, class T3, class T4>
 	PK_FinalTemplate(T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4)
-		{AccessKey().Initialize(v1, v2, v3, v4);}
+		{this->AccessKey().Initialize(v1, v2, v3, v4);}
 
 	template <class T1, class T2, class T3, class T4, class T5>
 	PK_FinalTemplate(T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5)
-		{AccessKey().Initialize(v1, v2, v3, v4, v5);}
+		{this->AccessKey().Initialize(v1, v2, v3, v4, v5);}
 
 	template <class T1, class T2, class T3, class T4, class T5, class T6>
 	PK_FinalTemplate(T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5, const T6 &v6)
-		{AccessKey().Initialize(v1, v2, v3, v4, v5, v6);}
+		{this->AccessKey().Initialize(v1, v2, v3, v4, v5, v6);}
 
 	template <class T1, class T2, class T3, class T4, class T5, class T6, class T7>
 	PK_FinalTemplate(T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5, const T6 &v6, const T7 &v7)
-		{AccessKey().Initialize(v1, v2, v3, v4, v5, v6, v7);}
+		{this->AccessKey().Initialize(v1, v2, v3, v4, v5, v6, v7);}
 
 	template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
 	PK_FinalTemplate(T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5, const T6 &v6, const T7 &v7, const T8 &v8)
-		{AccessKey().Initialize(v1, v2, v3, v4, v5, v6, v7, v8);}
+		{this->AccessKey().Initialize(v1, v2, v3, v4, v5, v6, v7, v8);}
 
 };
 
@@ -8377,7 +8378,7 @@
 class BlockCipherBaseTemplate : public AlgorithmImpl<SimpleKeyingInterfaceImpl<TwoBases<INFO, INTERFACE> > >
 {
 public:
-	unsigned int BlockSize() const {return BLOCKSIZE;}
+	unsigned int BlockSize() const {return this->BLOCKSIZE;}
 };
 
 //! .
@@ -8385,13 +8386,13 @@
 class BlockCipherTemplate : public BASE
 {
 public:
- 	BlockCipherTemplate() {}
+  	BlockCipherTemplate() {}
 	BlockCipherTemplate(const byte *key)
-		{SetKey(key, DEFAULT_KEYLENGTH);}
+		{SetKey(key, this->DEFAULT_KEYLENGTH);}
 	BlockCipherTemplate(const byte *key, unsigned int length)
 		{SetKey(key, length);}
 	BlockCipherTemplate(const byte *key, unsigned int length, unsigned int rounds)
-		{SetKeyWithRounds(key, length, rounds);}
+		{this->SetKeyWithRounds(key, length, rounds);}
 
 	bool IsForwardTransformation() const {return DIR == ENCRYPTION;}
 
@@ -8411,11 +8412,11 @@
 public:
  	MessageAuthenticationCodeTemplate() {}
 	MessageAuthenticationCodeTemplate(const byte *key)
-		{SetKey(key, DEFAULT_KEYLENGTH);}
+		{SetKey(key, this->DEFAULT_KEYLENGTH);}
 	MessageAuthenticationCodeTemplate(const byte *key, unsigned int length)
 		{SetKey(key, length);}
 
-	std::string AlgorithmName() const {return StaticAlgorithmName();}
+	std::string AlgorithmName() const {return this->StaticAlgorithmName();}
 
 	void SetKey(const byte *key, unsigned int length, const NameValuePairs &param = g_nullNameValuePairs)
 	{
@@ -8478,22 +8479,22 @@
 		void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length)
 		{
 			assert(direction == ENCRYPTION);
-			AssertValidKeyLength(length);
-			memcpy(Key(), userKey, KEYLENGTH);
-			T::CorrectEndianess(Key(), Key(), KEYLENGTH);
+			this->AssertValidKeyLength(length);
+			memcpy(Key(), userKey, this->KEYLENGTH);
+			T::CorrectEndianess(Key(), Key(), this->KEYLENGTH);
 		}
 
 		void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
 		{
-			T::CorrectEndianess(Buffer(), (HashWordType *)inBlock, BLOCKSIZE);
+			T::CorrectEndianess(Buffer(), (HashWordType *)inBlock, this->BLOCKSIZE);
 			T::Transform(Buffer(), Key());
 			if (xorBlock)
 			{
-				T::CorrectEndianess(Buffer(), Buffer(), BLOCKSIZE);
-				xorbuf(outBlock, xorBlock, m_buffer, BLOCKSIZE);
+				T::CorrectEndianess(Buffer(), Buffer(), this->BLOCKSIZE);
+				xorbuf(outBlock, xorBlock, m_buffer, this->BLOCKSIZE);
 			}
 			else
-				T::CorrectEndianess((HashWordType *)outBlock, Buffer(), BLOCKSIZE);
+				T::CorrectEndianess((HashWordType *)outBlock, Buffer(), this->BLOCKSIZE);
 		}
 
 		bool IsPermutation() const {return false;}
@@ -8764,12 +8765,12 @@
     byte GenerateByte();
     void ProcessData(byte *outString, const byte *inString, unsigned int length);
 	void Resynchronize(const byte *iv);
-	unsigned int OptimalBlockSize() const {return GetPolicy().GetBytesPerIteration();}
+	unsigned int OptimalBlockSize() const {return this->GetPolicy().GetBytesPerIteration();}
 	unsigned int GetOptimalNextBlockSize() const {return m_leftOver;}
-	unsigned int OptimalDataAlignment() const {return GetPolicy().GetAlignment();}
+	unsigned int OptimalDataAlignment() const {return this->GetPolicy().GetAlignment();}
 	bool IsSelfInverting() const {return true;}
 	bool IsForwardTransformation() const {return true;}
-	bool IsRandomAccess() const {return GetPolicy().IsRandomAccess();}
+	bool IsRandomAccess() const {return this->GetPolicy().IsRandomAccess();}
 	void Seek(dword position);
 
 	typedef typename BASE::PolicyInterface PolicyInterface;
@@ -8806,7 +8807,7 @@
 	unsigned int GetAlignment() const {return sizeof(WordType);}
 	unsigned int GetBytesPerIteration() const {return sizeof(WordType) * W;}
 	bool CanIterate() const {return true;}
-	void TransformRegister() {Iterate(NULL, NULL, ENCRYPTION, 1);}
+	void TransformRegister() {this->Iterate(NULL, NULL, ENCRYPTION, 1);}
 
 	template <class B>
 	struct RegisterOutput
@@ -8856,9 +8857,9 @@
 public:
 	void ProcessData(byte *outString, const byte *inString, unsigned int length);
 	void Resynchronize(const byte *iv);
-	unsigned int OptimalBlockSize() const {return GetPolicy().GetBytesPerIteration();}
+	unsigned int OptimalBlockSize() const {return this->GetPolicy().GetBytesPerIteration();}
 	unsigned int GetOptimalNextBlockSize() const {return m_leftOver;}
-	unsigned int OptimalDataAlignment() const {return GetPolicy().GetAlignment();}
+	unsigned int OptimalDataAlignment() const {return this->GetPolicy().GetAlignment();}
 	bool IsRandomAccess() const {return false;}
 	bool IsSelfInverting() const {return false;}
 
@@ -8892,16 +8893,16 @@
 public:
  	SymmetricCipherFinalTemplate() {}
 	SymmetricCipherFinalTemplate(const byte *key)
-		{SetKey(key, DEFAULT_KEYLENGTH);}
+		{SetKey(key, this->DEFAULT_KEYLENGTH);}
 	SymmetricCipherFinalTemplate(const byte *key, unsigned int length)
 		{SetKey(key, length);}
 	SymmetricCipherFinalTemplate(const byte *key, unsigned int length, const byte *iv)
-		{SetKey(key, length); Resynchronize(iv);}
+		{SetKey(key, length); this->Resynchronize(iv);}
 
 	void SetKey(const byte *key, unsigned int length, const NameValuePairs &params = g_nullNameValuePairs)
 	{
-		ThrowIfInvalidKeyLength(length);
-		UncheckedSetKey(params, key, length);
+		this->ThrowIfInvalidKeyLength(length);
+		this->UncheckedSetKey(params, key, length);
 	}
 
 	Clonable * Clone() const {return static_cast<SymmetricCipher *>(new SymmetricCipherFinalTemplate<BASE, INFO>(*this));}
@@ -8910,7 +8911,7 @@
 template <class S>
 void AdditiveCipherTemplate<S>::UncheckedSetKey(const NameValuePairs &params, const byte *key, unsigned int length)
 {
-	PolicyInterface &policy = AccessPolicy();
+	PolicyInterface &policy = this->AccessPolicy();
 	policy.CipherSetKey(params, key, length);
 	m_buffer.New(GetBufferByteSize(policy));
 	m_leftOver = 0;
@@ -8919,7 +8920,7 @@
 template <class BASE>
 void CFB_CipherTemplate<BASE>::UncheckedSetKey(const NameValuePairs &params, const byte *key, unsigned int length)
 {
-	PolicyInterface &policy = AccessPolicy();
+	PolicyInterface &policy = this->AccessPolicy();
 	policy.CipherSetKey(params, key, length);
 	m_leftOver = policy.GetBytesPerIteration();
 }
@@ -9157,18 +9158,18 @@
 public:
 	CipherModeFinalTemplate_CipherHolder()
 	{
-		m_cipher = &m_object;
-		ResizeBuffers();
+		this->m_cipher = &this->m_object;
+		this->ResizeBuffers();
 	}
 	CipherModeFinalTemplate_CipherHolder(const byte *key, unsigned int length)
 	{
-		m_cipher = &m_object;
-		SetKey(key, length);
+		this->m_cipher = &this->m_object;
+		this->SetKey(key, length);
 	}
 	CipherModeFinalTemplate_CipherHolder(const byte *key, unsigned int length, const byte *iv, int feedbackSize = 0)
 	{
-		m_cipher = &m_object;
-		SetKey(key, length, MakeParameters("IV", iv)("FeedbackSize", feedbackSize));
+		this->m_cipher = &this->m_object;
+		this->SetKey(key, length, MakeParameters("IV", iv)("FeedbackSize", feedbackSize));
 	}
 };
 
@@ -9179,10 +9180,10 @@
 public:
 	CipherModeFinalTemplate_ExternalCipher(BlockCipher &cipher, const byte *iv = NULL, int feedbackSize = 0)
 	{
-		m_cipher = &cipher;
-		ResizeBuffers();
-		SetFeedbackSize(feedbackSize);
-		SetIV(iv);
+		this->m_cipher = &cipher;
+		this->ResizeBuffers();
+		this->SetFeedbackSize(feedbackSize);
+		this->SetIV(iv);
 	}
 };
 
