From 5283f5059b14d63ed0ed54c8384890320fbb9ec6 Mon Sep 17 00:00:00 2001 From: weidai Date: Sat, 19 Jun 2004 08:28:09 +0000 Subject: port to GCC 3.4 git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@168 57ff6487-cd31-0410-9ec3-f628ee90f5f0 --- strciphr.h | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'strciphr.h') diff --git a/strciphr.h b/strciphr.h index 15d2bb3..944ac09 100644 --- a/strciphr.h +++ b/strciphr.h @@ -124,12 +124,12 @@ public: 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 GetOptimalNextBlockSize() const {return m_leftOver;} - unsigned int OptimalDataAlignment() const {return GetPolicy().GetAlignment();} + unsigned int OptimalBlockSize() const {return this->GetPolicy().GetBytesPerIteration();} + unsigned int GetOptimalNextBlockSize() const {return this->m_leftOver;} + 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(lword position); typedef typename BASE::PolicyInterface PolicyInterface; @@ -139,8 +139,8 @@ protected: unsigned int GetBufferByteSize(const PolicyInterface &policy) const {return policy.GetBytesPerIteration() * policy.GetIterationsToBuffer();} - inline byte * KeystreamBufferBegin() {return m_buffer.data();} - inline byte * KeystreamBufferEnd() {return (m_buffer.data() + m_buffer.size());} + inline byte * KeystreamBufferBegin() {return this->m_buffer.data();} + inline byte * KeystreamBufferEnd() {return (this->m_buffer.data() + this->m_buffer.size());} SecByteBlock m_buffer; unsigned int m_leftOver; @@ -171,7 +171,7 @@ struct CRYPTOPP_NO_VTABLE CFB_CipherConcretePolicy : public BASE 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 struct RegisterOutput @@ -221,9 +221,9 @@ class CRYPTOPP_NO_VTABLE CFB_CipherTemplate : public BASE 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;} @@ -255,7 +255,7 @@ template class CFB_RequireFullDataBlocks : public BASE { public: - unsigned int MandatoryBlockSize() const {return OptimalBlockSize();} + unsigned int MandatoryBlockSize() const {return this->OptimalBlockSize();} }; /* @@ -271,16 +271,16 @@ class SymmetricCipherFinal : public AlgorithmImplDEFAULT_KEYLENGTH);} SymmetricCipherFinal(const byte *key, unsigned int length) {SetKey(key, length);} SymmetricCipherFinal(const byte *key, unsigned int length, const byte *iv) - {SetKeyWithIV(key, length, iv);} + {this->SetKeyWithIV(key, length, iv);} void SetKey(const byte *key, unsigned int length, const NameValuePairs ¶ms = g_nullNameValuePairs) { - ThrowIfInvalidKeyLength(length); - UncheckedSetKey(params, key, length, GetIVAndThrowIfInvalid(params)); + this->ThrowIfInvalidKeyLength(length); + this->UncheckedSetKey(params, key, length, this->GetIVAndThrowIfInvalid(params)); } Clonable * Clone() const {return static_cast(new SymmetricCipherFinal(*this));} @@ -289,22 +289,22 @@ public: template void AdditiveCipherTemplate::UncheckedSetKey(const NameValuePairs ¶ms, const byte *key, unsigned int length, const byte *iv) { - PolicyInterface &policy = AccessPolicy(); + PolicyInterface &policy = this->AccessPolicy(); policy.CipherSetKey(params, key, length); m_leftOver = 0; m_buffer.New(GetBufferByteSize(policy)); - if (IsResynchronizable()) + if (this->IsResynchronizable()) policy.CipherResynchronize(m_buffer, iv); } template void CFB_CipherTemplate::UncheckedSetKey(const NameValuePairs ¶ms, const byte *key, unsigned int length, const byte *iv) { - PolicyInterface &policy = AccessPolicy(); + PolicyInterface &policy = this->AccessPolicy(); policy.CipherSetKey(params, key, length); - if (IsResynchronizable()) + if (this->IsResynchronizable()) policy.CipherResynchronize(iv); m_leftOver = policy.GetBytesPerIteration(); -- cgit v1.2.1