Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 30386 Details for
Bug 49449
dev-libs/crypto++ fails to compile with gcc 3.4
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
crypto++-5.1-gcc34.diff
crypto++-5.1-gcc34.diff (text/plain), 81.68 KB, created by
Thomas Weidner
on 2004-04-30 04:40:32 UTC
(
hide
)
Description:
crypto++-5.1-gcc34.diff
Filename:
MIME Type:
Creator:
Thomas Weidner
Created:
2004-04-30 04:40:32 UTC
Size:
81.68 KB
patch
obsolete
>Only in crypto++-5.1.gcc34: adhoc.cpp >diff -ru --exclude='*~' crypto++-5.1/algebra.cpp crypto++-5.1.gcc34/algebra.cpp >--- crypto++-5.1/algebra.cpp 2002-10-04 19:31:41.000000000 +0200 >+++ crypto++-5.1.gcc34/algebra.cpp 2004-04-29 22:40:29.000000000 +0200 >@@ -54,7 +54,7 @@ > Element g[3]={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; i0 = i1; i1 = i2; i2 = t; >diff -ru --exclude='*~' crypto++-5.1/asn.h crypto++-5.1.gcc34/asn.h >--- crypto++-5.1/asn.h 2003-03-20 02:24:11.000000000 +0100 >+++ crypto++-5.1.gcc34/asn.h 2004-04-29 22:42:19.000000000 +0200 >@@ -221,8 +221,8 @@ > } > void DEREncode(BufferedTransformation &out) > { >- if (get() != NULL) >- get()->DEREncode(out); >+ if (this->get() != NULL) >+ this->get()->DEREncode(out); > } > }; > >diff -ru --exclude='*~' crypto++-5.1/blowfish.cpp crypto++-5.1.gcc34/blowfish.cpp >--- crypto++-5.1/blowfish.cpp 2002-10-04 19:31:42.000000000 +0200 >+++ crypto++-5.1.gcc34/blowfish.cpp 2004-04-29 22:42:31.000000000 +0200 >@@ -30,7 +30,7 @@ > for (i=0; i<ROUNDS; i+=2) > crypt_block(pbox+i, pbox+i+2); > >- crypt_block(pbox+ROUNDS, sbox); >+ crypt_block((word32*)pbox+ROUNDS, sbox); > > for (i=0; i<4*256-2; i+=2) > crypt_block(sbox+i, sbox+i+2); >diff -ru --exclude='*~' crypto++-5.1/cbcmac.h crypto++-5.1.gcc34/cbcmac.h >--- crypto++-5.1/cbcmac.h 2002-10-04 19:31:42.000000000 +0200 >+++ crypto++-5.1.gcc34/cbcmac.h 2004-04-30 13:14:36.000000000 +0200 >@@ -37,7 +37,7 @@ > public: > CBC_MAC() {} > CBC_MAC(const byte *key, unsigned int length=CBC_MAC_Base<T>::DEFAULT_KEYLENGTH) >- {SetKey(key, length);} >+ {this->SetKey(key, length);} > }; > > template <class T> >diff -ru --exclude='*~' crypto++-5.1/dh.h crypto++-5.1.gcc34/dh.h >--- crypto++-5.1/dh.h 2002-11-19 21:44:40.000000000 +0100 >+++ crypto++-5.1.gcc34/dh.h 2004-04-30 12:51:49.000000000 +0200 >@@ -61,18 +61,18 @@ > > if (FIPS_140_2_ComplianceEnabled()) > { >- SecByteBlock privateKey2(PrivateKeyLength()); >- GeneratePrivateKey(rng, privateKey2); >+ SecByteBlock privateKey2(this->PrivateKeyLength()); >+ this->GeneratePrivateKey(rng, privateKey2); > >- SecByteBlock publicKey2(PublicKeyLength()); >+ SecByteBlock publicKey2(this->PublicKeyLength()); > Base::GeneratePublicKey(rng, privateKey2, publicKey2); > >- SecByteBlock agreedValue(AgreedValueLength()), agreedValue2(AgreedValueLength()); >- Agree(agreedValue, privateKey, publicKey2); >- Agree(agreedValue2, privateKey2, publicKey); >+ SecByteBlock agreedValue(this->AgreedValueLength()), agreedValue2(this->AgreedValueLength()); >+ this->Agree(agreedValue, privateKey, publicKey2); >+ this->Agree(agreedValue2, privateKey2, publicKey); > > if (agreedValue != agreedValue2) >- throw SelfTestFailure(AlgorithmName() + ": pairwise consistency test failed"); >+ throw SelfTestFailure(this->AlgorithmName() + ": pairwise consistency test failed"); > } > } > >diff -ru --exclude='*~' crypto++-5.1/dmac.h crypto++-5.1.gcc34/dmac.h >--- crypto++-5.1/dmac.h 2002-10-04 19:31:45.000000000 +0200 >+++ crypto++-5.1.gcc34/dmac.h 2004-04-30 13:14:35.000000000 +0200 >@@ -40,7 +40,7 @@ > public: > DMAC() {} > DMAC(const byte *key, unsigned int length=DMAC_Base<T>::DEFAULT_KEYLENGTH) >- {SetKey(key, length);} >+ {this->SetKey(key, length);} > }; > > template <class T> >diff -ru --exclude='*~' crypto++-5.1/dsa.cpp crypto++-5.1.gcc34/dsa.cpp >--- crypto++-5.1/dsa.cpp 2002-10-04 19:31:46.000000000 +0200 >+++ crypto++-5.1.gcc34/dsa.cpp 2004-04-30 12:52:13.000000000 +0200 >@@ -98,7 +98,7 @@ > if (!useInputCounterValue || c == counter) > { > W[SHA::DIGESTSIZE - 1 - b/8] |= 0x80; >- X.Decode(W + SHA::DIGESTSIZE - 1 - b/8, L/8); >+ X.Decode((byte*)W + SHA::DIGESTSIZE - 1 - b/8, L/8); > p = X-((X % (2*q))-1); > > if (p.GetBit(L-1) && IsPrime(p)) >diff -ru --exclude='*~' crypto++-5.1/eccrypto.cpp crypto++-5.1.gcc34/eccrypto.cpp >--- crypto++-5.1/eccrypto.cpp 2003-03-20 02:24:11.000000000 +0100 >+++ crypto++-5.1.gcc34/eccrypto.cpp 2004-04-30 12:54:35.000000000 +0200 >@@ -369,7 +369,7 @@ > const EcRecommendedParameters<EllipticCurve> ¶m = *it; > m_oid = oid; > std::auto_ptr<EllipticCurve> ec(param.NewEC()); >- m_groupPrecomputation.SetCurve(*ec); >+ this->m_groupPrecomputation.SetCurve(*ec); > > StringSource ssG(param.g, true, new HexDecoder); > Element G; >@@ -390,7 +390,7 @@ > if (m_oid.m_values.empty()) > return false; > >- ThrowIfTypeMismatch(name, typeid(OID), valueType); >+ this->ThrowIfTypeMismatch(name, typeid(OID), valueType); > *reinterpret_cast<OID *>(pValue) = m_oid; > return true; > } >@@ -471,7 +471,7 @@ > DERSequenceEncoder seq(bt); > DEREncodeUnsigned<word32>(seq, 1); // version > GetCurve().DEREncode(seq); >- GetCurve().DEREncodePoint(seq, GetSubgroupGenerator(), m_compress); >+ GetCurve().DEREncodePoint(seq, this->GetSubgroupGenerator(), m_compress); > m_n.DEREncode(seq); > if (m_k.NotZero()) > m_k.DEREncode(seq); >@@ -525,12 +525,12 @@ > if (level >= 1) > { > if (gpc) >- pass = pass && gpc->Exponentiate(GetGroupPrecomputation(), Integer::One()) == g; >+ pass = pass && gpc->Exponentiate(this->GetGroupPrecomputation(), Integer::One()) == g; > } > if (level >= 2) > { > const Integer &q = GetSubgroupOrder(); >- pass = pass && IsIdentity(gpc ? gpc->Exponentiate(GetGroupPrecomputation(), q) : ExponentiateElement(g, q)); >+ pass = pass && IsIdentity(gpc ? gpc->Exponentiate(this->GetGroupPrecomputation(), q) : ExponentiateElement(g, q)); > } > return pass; > } >@@ -565,7 +565,7 @@ > void DL_PublicKey_EC<EC>::BERDecodeKey2(BufferedTransformation &bt, bool parametersPresent, unsigned int size) > { > typename EC::Point P; >- if (!GetGroupParameters().GetCurve().DecodePoint(P, bt, size)) >+ if (!this->GetGroupParameters().GetCurve().DecodePoint(P, bt, size)) > BERDecodeError(); > SetPublicElement(P); > } >@@ -573,7 +573,7 @@ > template <class EC> > void DL_PublicKey_EC<EC>::DEREncodeKey(BufferedTransformation &bt) const > { >- GetGroupParameters().GetCurve().EncodePoint(bt, GetPublicElement(), GetGroupParameters().GetPointCompression()); >+ this->GetGroupParameters().GetCurve().EncodePoint(bt, this->GetPublicElement(), this->GetGroupParameters().GetPointCompression()); > } > > // ****************************************************************** >@@ -596,7 +596,7 @@ > if (!seq.EndReached() && seq.PeekByte() == (CONTEXT_SPECIFIC | CONSTRUCTED | 0)) > { > BERGeneralDecoder parameters(seq, CONTEXT_SPECIFIC | CONSTRUCTED | 0); >- AccessGroupParameters().BERDecode(parameters); >+ this->AccessGroupParameters().BERDecode(parameters); > parameters.MessageEnd(); > } > if (!seq.EndReached()) >@@ -608,12 +608,12 @@ > BERDecodeBitString(publicKey, subjectPublicKey, unusedBits); > publicKey.MessageEnd(); > Element Q; >- if (!(unusedBits == 0 && GetGroupParameters().GetCurve().DecodePoint(Q, subjectPublicKey, subjectPublicKey.size()))) >+ if (!(unusedBits == 0 && this->GetGroupParameters().GetCurve().DecodePoint(Q, subjectPublicKey, subjectPublicKey.size()))) > BERDecodeError(); > } > seq.MessageEnd(); > >- SetPrivateExponent(x); >+ this->SetPrivateExponent(x); > } > > template <class EC> >@@ -623,7 +623,7 @@ > DEREncodeUnsigned<word32>(privateKey, 1); // version > // SEC 1 ver 1.0 says privateKey (m_d) has the same length as order of the curve > // this will be changed to order of base point in a future version >- GetPrivateExponent().DEREncodeAsOctetString(privateKey, GetGroupParameters().GetSubgroupOrder().ByteCount()); >+ this->GetPrivateExponent().DEREncodeAsOctetString(privateKey, this->GetGroupParameters().GetSubgroupOrder().ByteCount()); > privateKey.MessageEnd(); > } > >diff -ru --exclude='*~' crypto++-5.1/eccrypto.h crypto++-5.1.gcc34/eccrypto.h >--- crypto++-5.1/eccrypto.h 2003-03-20 02:24:11.000000000 +0100 >+++ crypto++-5.1.gcc34/eccrypto.h 2004-04-30 12:54:23.000000000 +0200 >@@ -42,7 +42,7 @@ > > void Initialize(const EllipticCurve &ec, const Point &G, const Integer &n, const Integer &k = Integer::Zero()) > { >- m_groupPrecomputation.SetCurve(ec); >+ this->m_groupPrecomputation.SetCurve(ec); > SetSubgroupGenerator(G); > m_n = n; > m_k = k; >@@ -59,8 +59,8 @@ > void GenerateRandom(RandomNumberGenerator &rng, const NameValuePairs &alg); > > // DL_GroupParameters >- 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;} > const Integer & GetSubgroupOrder() const {return m_n;} > Integer GetCofactor() const; > bool ValidateGroup(RandomNumberGenerator &rng, unsigned int level) const; >@@ -115,7 +115,7 @@ > void SetEncodeAsOID(bool encodeAsOID) {m_encodeAsOID = encodeAsOID;} > bool GetEncodeAsOID() const {return m_encodeAsOID;} > >- const EllipticCurve& GetCurve() const {return m_groupPrecomputation.GetCurve();} >+ const EllipticCurve& GetCurve() const {return this->m_groupPrecomputation.GetCurve();} > > #ifdef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY > const Point& GetBasePoint() const {return GetSubgroupGenerator();} >@@ -141,9 +141,9 @@ > typedef typename EC::Point Element; > > void Initialize(const DL_GroupParameters_EC<EC> ¶ms, const Element &Q) >- {AccessGroupParameters() = params; SetPublicElement(Q);} >+ {this->AccessGroupParameters() = params; SetPublicElement(Q);} > void Initialize(const EC &ec, const Element &G, const Integer &n, const Element &Q) >- {AccessGroupParameters().Initialize(ec, G, n); SetPublicElement(Q);} >+ {this->AccessGroupParameters().Initialize(ec, G, n); SetPublicElement(Q);} > > // X509PublicKey > void BERDecodeKey2(BufferedTransformation &bt, bool parametersPresent, unsigned int size); >@@ -158,9 +158,9 @@ > typedef typename EC::Point Element; > > void Initialize(const DL_GroupParameters_EC<EC> ¶ms, const Integer &x) >- {AccessGroupParameters() = params; SetPrivateExponent(x);} >+ {this->AccessGroupParameters() = params; this->SetPrivateExponent(x);} > void Initialize(const EC &ec, const Element &G, const Integer &n, const Integer &x) >- {AccessGroupParameters().Initialize(ec, G, n); SetPrivateExponent(x);} >+ {this->AccessGroupParameters().Initialize(ec, G, n); this->SetPrivateExponent(x);} > void Initialize(RandomNumberGenerator &rng, const DL_GroupParameters_EC<EC> ¶ms) > {GenerateRandom(rng, params);} > void Initialize(RandomNumberGenerator &rng, const EC &ec, const Element &G, const Integer &n) >diff -ru --exclude='*~' crypto++-5.1/elgamal.h crypto++-5.1.gcc34/elgamal.h >--- crypto++-5.1/elgamal.h 2003-03-20 02:24:11.000000000 +0100 >+++ crypto++-5.1.gcc34/elgamal.h 2004-04-30 12:55:01.000000000 +0200 >@@ -79,9 +79,9 @@ > { > public: > unsigned int FixedMaxPlaintextLength() const {return MaxPlaintextLength(FixedCiphertextLength());} >- unsigned int FixedCiphertextLength() const {return CiphertextLength(0);} >+ unsigned int FixedCiphertextLength() const {return this->CiphertextLength(0);} > >- const DL_GroupParameters_GFP & GetGroupParameters() const {return GetKey().GetGroupParameters();} >+ const DL_GroupParameters_GFP & GetGroupParameters() const {return this->GetKey().GetGroupParameters();} > > DecodingResult FixedLengthDecrypt(RandomNumberGenerator &rng, const byte *cipherText, byte *plainText) const > {return Decrypt(rng, cipherText, FixedCiphertextLength(), plainText);} >diff -ru --exclude='*~' crypto++-5.1/gfpcrypt.h crypto++-5.1.gcc34/gfpcrypt.h >--- crypto++-5.1/gfpcrypt.h 2003-03-20 02:24:11.000000000 +0100 >+++ crypto++-5.1.gcc34/gfpcrypt.h 2004-04-30 12:50:55.000000000 +0200 >@@ -93,19 +93,19 @@ > {AssignFromHelper<DL_GroupParameters_IntegerBased>(this, source);} > > // DL_GroupParameters >- 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;} > > // IntegerGroupParameters >- const Integer & GetModulus() const {return m_groupPrecomputation.GetModulus();} >- const Integer & GetGenerator() const {return m_gpc.GetBase(GetGroupPrecomputation());} >+ const Integer & GetModulus() const {return this->m_groupPrecomputation.GetModulus();} >+ const Integer & GetGenerator() const {return this->m_gpc.GetBase(this->GetGroupPrecomputation());} > > void SetModulusAndSubgroupGenerator(const Integer &p, const Integer &g) // these have to be set together >- {m_groupPrecomputation.SetModulus(p); m_gpc.SetBase(GetGroupPrecomputation(), g); ParametersChanged();} >+ {this->m_groupPrecomputation.SetModulus(p); this->m_gpc.SetBase(this->GetGroupPrecomputation(), g); this->ParametersChanged();} > > // non-inherited > bool operator==(const DL_GroupParameters_IntegerBasedImpl<GROUP_PRECOMP, BASE_PRECOMP> &rhs) const >- {return GetModulus() == rhs.GetModulus() && GetGenerator() == rhs.GetGenerator() && GetSubgroupOrder() == rhs.GetSubgroupOrder();} >+ {return GetModulus() == rhs.GetModulus() && GetGenerator() == rhs.GetGenerator() && this->GetSubgroupOrder() == rhs.GetSubgroupOrder();} > bool operator!=(const DL_GroupParameters_IntegerBasedImpl<GROUP_PRECOMP, BASE_PRECOMP> &rhs) const > {return !operator==(rhs);} > }; >@@ -210,17 +210,17 @@ > { > public: > void Initialize(const DL_GroupParameters_IntegerBased ¶ms, const Integer &y) >- {AccessGroupParameters().Initialize(params); SetPublicElement(y);} >+ {this->AccessGroupParameters().Initialize(params); this->SetPublicElement(y);} > void Initialize(const Integer &p, const Integer &g, const Integer &y) >- {AccessGroupParameters().Initialize(p, g); SetPublicElement(y);} >+ {this->AccessGroupParameters().Initialize(p, g); this->SetPublicElement(y);} > void Initialize(const Integer &p, const Integer &q, const Integer &g, const Integer &y) >- {AccessGroupParameters().Initialize(p, q, g); SetPublicElement(y);} >+ {this->AccessGroupParameters().Initialize(p, q, g); this->SetPublicElement(y);} > > // X509PublicKey > void BERDecodeKey(BufferedTransformation &bt) >- {SetPublicElement(Integer(bt));} >+ {this->SetPublicElement(Integer(bt));} > void DEREncodeKey(BufferedTransformation &bt) const >- {GetPublicElement().DEREncode(bt);} >+ {this->GetPublicElement().DEREncode(bt);} > }; > > //! . >@@ -229,17 +229,17 @@ > { > public: > void Initialize(RandomNumberGenerator &rng, unsigned int modulusBits) >- {GenerateRandomWithKeySize(rng, modulusBits);} >+ {this->GenerateRandomWithKeySize(rng, modulusBits);} > void Initialize(RandomNumberGenerator &rng, const Integer &p, const Integer &g) >- {GenerateRandom(rng, MakeParameters("Modulus", p)("SubgroupGenerator", g));} >+ {this->GenerateRandom(rng, MakeParameters("Modulus", p)("SubgroupGenerator", g));} > void Initialize(RandomNumberGenerator &rng, const Integer &p, const Integer &q, const Integer &g) >- {GenerateRandom(rng, MakeParameters("Modulus", p)("SubgroupOrder", q)("SubgroupGenerator", g));} >+ {this->GenerateRandom(rng, MakeParameters("Modulus", p)("SubgroupOrder", q)("SubgroupGenerator", g));} > void Initialize(const DL_GroupParameters_IntegerBased ¶ms, const Integer &x) >- {AccessGroupParameters().Initialize(params); SetPrivateExponent(x);} >+ {this->AccessGroupParameters().Initialize(params); this->SetPrivateExponent(x);} > void Initialize(const Integer &p, const Integer &g, const Integer &x) >- {AccessGroupParameters().Initialize(p, g); SetPrivateExponent(x);} >+ {this->AccessGroupParameters().Initialize(p, g); this->SetPrivateExponent(x);} > void Initialize(const Integer &p, const Integer &q, const Integer &g, const Integer &x) >- {AccessGroupParameters().Initialize(p, q, g); SetPrivateExponent(x);} >+ {this->AccessGroupParameters().Initialize(p, q, g); this->SetPrivateExponent(x);} > }; > > //! . >@@ -272,14 +272,14 @@ > > if (seq.EndReached()) > { >- AccessGroupParameters().Initialize(v1, v1/2, v2); >- SetPublicElement(v3); >+ this->AccessGroupParameters().Initialize(v1, v1/2, v2); >+ this->SetPublicElement(v3); > } > else > { > Integer v4(seq); >- AccessGroupParameters().Initialize(v1, v2, v3); >- SetPublicElement(v4); >+ this->AccessGroupParameters().Initialize(v1, v2, v3); >+ this->SetPublicElement(v4); > } > > seq.MessageEnd(); >@@ -288,11 +288,11 @@ > void DEREncode(BufferedTransformation &bt) const > { > DERSequenceEncoder seq(bt); >- GetGroupParameters().GetModulus().DEREncode(seq); >- if (GetGroupParameters().GetCofactor() != 2) >- GetGroupParameters().GetSubgroupOrder().DEREncode(seq); >- GetGroupParameters().GetGenerator().DEREncode(seq); >- GetPublicElement().DEREncode(seq); >+ this->GetGroupParameters().GetModulus().DEREncode(seq); >+ if (this->GetGroupParameters().GetCofactor() != 2) >+ this->GetGroupParameters().GetSubgroupOrder().DEREncode(seq); >+ this->GetGroupParameters().GetGenerator().DEREncode(seq); >+ this->GetPublicElement().DEREncode(seq); > seq.MessageEnd(); > } > }; >@@ -312,14 +312,14 @@ > > if (seq.EndReached()) > { >- AccessGroupParameters().Initialize(v1, v1/2, v2); >- SetPrivateExponent(v4 % (v1/2)); // some old keys may have x >= q >+ this->AccessGroupParameters().Initialize(v1, v1/2, v2); >+ this->SetPrivateExponent(v4 % (v1/2)); // some old keys may have x >= q > } > else > { > Integer v5(seq); >- AccessGroupParameters().Initialize(v1, v2, v3); >- SetPrivateExponent(v5); >+ this->AccessGroupParameters().Initialize(v1, v2, v3); >+ this->SetPrivateExponent(v5); > } > > seq.MessageEnd(); >@@ -328,12 +328,12 @@ > void DEREncode(BufferedTransformation &bt) const > { > DERSequenceEncoder seq(bt); >- GetGroupParameters().GetModulus().DEREncode(seq); >- if (GetGroupParameters().GetCofactor() != 2) >- GetGroupParameters().GetSubgroupOrder().DEREncode(seq); >- GetGroupParameters().GetGenerator().DEREncode(seq); >- GetGroupParameters().ExponentiateBase(GetPrivateExponent()).DEREncode(seq); >- GetPrivateExponent().DEREncode(seq); >+ this->GetGroupParameters().GetModulus().DEREncode(seq); >+ if (this->GetGroupParameters().GetCofactor() != 2) >+ this->GetGroupParameters().GetSubgroupOrder().DEREncode(seq); >+ this->GetGroupParameters().GetGenerator().DEREncode(seq); >+ this->GetGroupParameters().ExponentiateBase(this->GetPrivateExponent()).DEREncode(seq); >+ this->GetPrivateExponent().DEREncode(seq); > seq.MessageEnd(); > } > }; >diff -ru --exclude='*~' crypto++-5.1/hmac.h crypto++-5.1.gcc34/hmac.h >--- crypto++-5.1/hmac.h 2002-10-04 19:31:49.000000000 +0200 >+++ crypto++-5.1.gcc34/hmac.h 2004-04-29 22:44:17.000000000 +0200 >@@ -44,7 +44,7 @@ > public: > HMAC() {} > HMAC(const byte *key, unsigned int length=HMAC_Base<T>::DEFAULT_KEYLENGTH) >- {SetKey(key, length);} >+ {this->SetKey(key, length);} > }; > > template <class T> >diff -ru --exclude='*~' crypto++-5.1/iterhash.h crypto++-5.1.gcc34/iterhash.h >--- crypto++-5.1/iterhash.h 2003-03-20 02:24:11.000000000 +0100 >+++ crypto++-5.1.gcc34/iterhash.h 2004-04-29 22:43:56.000000000 +0200 >@@ -82,7 +82,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();} > }; > >@@ -90,19 +90,19 @@ > > template <class T, class B, class BASE> void IteratedHashBase2<T, B, BASE>::TruncatedFinal(byte *hash, unsigned int size) > { >- ThrowIfInvalidTruncatedSize(size); >+ this->ThrowIfInvalidTruncatedSize(size); > >- PadLastBlock(BlockSize() - 2*sizeof(HashWordType)); >- CorrectEndianess(m_data, m_data, BlockSize() - 2*sizeof(HashWordType)); >+ PadLastBlock(this->BlockSize() - 2*sizeof(HashWordType)); >+ CorrectEndianess(this->m_data, this->m_data, this->BlockSize() - 2*sizeof(HashWordType)); > >- m_data[m_data.size()-2] = B::ToEnum() ? GetBitCountHi() : GetBitCountLo(); >- m_data[m_data.size()-1] = B::ToEnum() ? GetBitCountLo() : GetBitCountHi(); >+ 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(m_data); >- CorrectEndianess(m_digest, m_digest, DigestSize()); >- memcpy(hash, m_digest, size); >+ vTransform(this->m_data); >+ CorrectEndianess(this->m_digest, this->m_digest, this->DigestSize()); >+ memcpy(hash, this->m_digest, size); > >- Restart(); // reinit for next use >+ this->Restart(); // reinit for next use > } > > template <class T, class B, class BASE> void IteratedHashBase2<T, B, BASE>::HashBlock(const HashWordType *input) >@@ -111,8 +111,8 @@ > vTransform(input); > else > { >- ByteReverse(m_data.begin(), input, BlockSize()); >- vTransform(m_data); >+ ByteReverse(this->m_data.begin(), input, this->BlockSize()); >+ vTransform(this->m_data); > } > } > >diff -ru --exclude='*~' crypto++-5.1/lubyrack.h crypto++-5.1.gcc34/lubyrack.h >--- crypto++-5.1/lubyrack.h 2002-10-04 19:31:51.000000000 +0200 >+++ crypto++-5.1.gcc34/lubyrack.h 2004-04-30 13:19:14.877992920 +0200 >@@ -29,7 +29,7 @@ > // VC60 workaround: have to define these functions within class definition > void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length) > { >- AssertValidKeyLength(length); >+ this->AssertValidKeyLength(length); > > L = length/2; > buffer.New(2*S); >@@ -50,41 +50,41 @@ > { > public: > >-#define KL key >-#define KR key+L >-#define BL buffer >-#define BR buffer+S >+#define KL this->key >+#define KR this->key+this->L >+#define BL this->buffer >+#define BR (byte*)this->buffer+this->S > #define IL inBlock >-#define IR inBlock+S >+#define IR inBlock+this->S > #define OL outBlock >-#define OR outBlock+S >+#define OR outBlock+this->S > > void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const > { >- hm.Update(KL, L); >- hm.Update(IL, S); >- hm.Final(BR); >- xorbuf(BR, IR, S); >- >- hm.Update(KR, L); >- hm.Update(BR, S); >- hm.Final(BL); >- xorbuf(BL, IL, S); >- >- hm.Update(KL, L); >- hm.Update(BL, S); >- hm.Final(digest); >- xorbuf(BR, digest, S); >- >- hm.Update(KR, L); >- hm.Update(OR, S); >- hm.Final(digest); >- xorbuf(BL, digest, S); >+ this->hm.Update(KL, this->L); >+ this->hm.Update(IL, this->S); >+ this->hm.Final(BR); >+ xorbuf(BR, IR, this->S); >+ >+ this->hm.Update(KR, this->L); >+ this->hm.Update(BR, this->S); >+ this->hm.Final(BL); >+ xorbuf(BL, IL, this->S); >+ >+ this->hm.Update(KL, this->L); >+ this->hm.Update(BL, this->S); >+ this->hm.Final(this->digest); >+ xorbuf(BR, this->digest, this->S); >+ >+ this->hm.Update(KR, this->L); >+ this->hm.Update(OR, this->S); >+ this->hm.Final(this->digest); >+ xorbuf(BL, this->digest, this->S); > > if (xorBlock) >- xorbuf(outBlock, xorBlock, buffer, 2*S); >+ xorbuf(outBlock, xorBlock, this->buffer, 2*this->S); > else >- memcpy(outBlock, buffer, 2*S); >+ memcpy(outBlock, this->buffer, 2*this->S); > } > }; > >@@ -93,30 +93,30 @@ > public: > void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const > { >- hm.Update(KR, L); >- hm.Update(IR, S); >- hm.Final(BL); >- xorbuf(BL, IL, S); >- >- hm.Update(KL, L); >- hm.Update(BL, S); >- hm.Final(BR); >- xorbuf(BR, IR, S); >- >- hm.Update(KR, L); >- hm.Update(BR, S); >- hm.Final(digest); >- xorbuf(BL, digest, S); >- >- hm.Update(KL, L); >- hm.Update(OL, S); >- hm.Final(digest); >- xorbuf(BR, digest, S); >+ this->hm.Update(KR, this->L); >+ this->hm.Update(IR, this->S); >+ this->hm.Final(BL); >+ xorbuf(BL, IL, this->S); >+ >+ this->hm.Update(KL, this->L); >+ this->hm.Update(BL, this->S); >+ this->hm.Final(BR); >+ xorbuf(BR, IR, this->S); >+ >+ this->hm.Update(KR, this->L); >+ this->hm.Update(BR, this->S); >+ this->hm.Final(this->digest); >+ xorbuf(BL, this->digest, this->S); >+ >+ this->hm.Update(KL, this->L); >+ this->hm.Update(OL, this->S); >+ this->hm.Final(this->digest); >+ xorbuf(BR, this->digest, this->S); > > if (xorBlock) >- xorbuf(outBlock, xorBlock, buffer, 2*S); >+ xorbuf(outBlock, xorBlock, this->buffer, 2*this->S); > else >- memcpy(outBlock, buffer, 2*S); >+ memcpy(outBlock, this->buffer, 2*this->S); > } > #undef KL > #undef KR >diff -ru --exclude='*~' crypto++-5.1/mdc.h crypto++-5.1.gcc34/mdc.h >--- crypto++-5.1/mdc.h 2002-10-04 19:31:51.000000000 +0200 >+++ crypto++-5.1.gcc34/mdc.h 2004-04-30 13:02:28.000000000 +0200 >@@ -30,22 +30,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;} >diff -ru --exclude='*~' crypto++-5.1/modes.h crypto++-5.1.gcc34/modes.h >--- crypto++-5.1/modes.h 2003-02-24 02:06:40.000000000 +0100 >+++ crypto++-5.1.gcc34/modes.h 2004-04-29 22:44:49.000000000 +0200 >@@ -239,18 +239,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)); > } > }; > >@@ -261,10 +261,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); > } > }; > >diff -ru --exclude='*~' crypto++-5.1/osrng.h crypto++-5.1.gcc34/osrng.h >--- crypto++-5.1/osrng.h 2003-03-20 02:24:11.000000000 +0100 >+++ crypto++-5.1.gcc34/osrng.h 2004-04-30 13:21:29.335552264 +0200 >@@ -7,6 +7,7 @@ > > #include "randpool.h" > #include "rng.h" >+#include "fips140.h" > > NAMESPACE_BEGIN(CryptoPP) > >@@ -128,7 +129,7 @@ > do > { > OS_GenerateRandomBlock(blocking, seed, seed.size()); >- key = seed + BLOCK_CIPHER::BLOCKSIZE; >+ key = (byte*)seed + BLOCK_CIPHER::BLOCKSIZE; > } // check that seed and key don't have same value > while (memcmp(key, seed, STDMIN((unsigned int)BLOCK_CIPHER::BLOCKSIZE, (unsigned int)BLOCK_CIPHER::DEFAULT_KEYLENGTH)) == 0); > >diff -ru --exclude='*~' crypto++-5.1/panama.cpp crypto++-5.1.gcc34/panama.cpp >--- crypto++-5.1/panama.cpp 2002-10-04 19:31:53.000000000 +0200 >+++ crypto++-5.1.gcc34/panama.cpp 2004-04-30 13:01:24.000000000 +0200 >@@ -90,7 +90,7 @@ > template <class B> > unsigned int PanamaHash<B>::HashMultipleBlocks(const word32 *input, unsigned int length) > { >- Iterate(length / BLOCKSIZE, input); >+ this->Iterate(length / BLOCKSIZE, input); > return length % BLOCKSIZE; > } > >@@ -103,10 +103,10 @@ > > vTransform(m_data); > >- Iterate(32); // pull >+ this->Iterate(32); // pull > >- ConditionalByteReverse(B::ToEnum(), m_state+9, m_state+9, DIGESTSIZE); >- memcpy(hash, m_state+9, size); >+ ConditionalByteReverse(B::ToEnum(), this->m_state+9, this->m_state+9, DIGESTSIZE); >+ memcpy(hash, this->m_state+9, size); > > Restart(); // reinit for next use > } >@@ -116,22 +116,22 @@ > { > FixedSizeSecBlock<word32, 8> buf; > >- Reset(); >+ this->Reset(); > memcpy(buf, key, 32); >- Iterate(1, buf); >+ this->Iterate(1, buf); > if (length == 64) > memcpy(buf, key+32, 32); > else > memset(buf, 0, 32); >- Iterate(1, buf); >+ this->Iterate(1, buf); > >- Iterate(32); >+ this->Iterate(32); > } > > template <class B> > void PanamaCipherPolicy<B>::OperateKeystream(KeystreamOperation operation, byte *output, const byte *input, unsigned int iterationCount) > { >- Iterate(iterationCount, NULL, (word32 *)output, (const word32 *)input); >+ this->Iterate(iterationCount, NULL, (word32 *)output, (const word32 *)input); > } > > template class Panama<BigEndian>; >diff -ru --exclude='*~' crypto++-5.1/panama.h crypto++-5.1.gcc34/panama.h >--- crypto++-5.1/panama.h 2002-10-04 19:31:53.000000000 +0200 >+++ crypto++-5.1.gcc34/panama.h 2004-04-30 13:01:19.000000000 +0200 >@@ -36,7 +36,7 @@ > > protected: > void Init() {Panama<B>::Reset();} >- void vTransform(const word32 *data) {Iterate(1, data);} // push >+ void vTransform(const word32 *data) {this->Iterate(1, data);} // push > unsigned int HashMultipleBlocks(const word32 *input, unsigned int length); > }; > >@@ -70,7 +70,7 @@ > public: > PanamaMAC() {} > PanamaMAC(const byte *key, unsigned int length=PanamaMAC_Base<B>::DEFAULT_KEYLENGTH) >- {SetKey(key, length);} >+ {this->SetKey(key, length);} > }; > > //! . >diff -ru --exclude='*~' crypto++-5.1/polynomi.h crypto++-5.1.gcc34/polynomi.h >--- crypto++-5.1/polynomi.h 2003-03-20 02:24:11.000000000 +0100 >+++ crypto++-5.1.gcc34/polynomi.h 2004-04-30 12:59:34.000000000 +0200 >@@ -316,46 +316,46 @@ > {return a.Equals(b, m_ring);} > > const Element& Identity() const >- {return result = m_ring.Identity();} >+ {return this->result = m_ring.Identity();} > > const Element& Add(const Element &a, const Element &b) const >- {return result = a.Plus(b, m_ring);} >+ {return this->result = a.Plus(b, m_ring);} > > Element& Accumulate(Element &a, const Element &b) const > {a.Accumulate(b, m_ring); return a;} > > const Element& Inverse(const Element &a) const >- {return result = a.Inverse(m_ring);} >+ {return this->result = a.Inverse(m_ring);} > > const Element& Subtract(const Element &a, const Element &b) const >- {return result = a.Minus(b, m_ring);} >+ {return this->result = a.Minus(b, m_ring);} > > Element& Reduce(Element &a, const Element &b) const > {return a.Reduce(b, m_ring);} > > const Element& Double(const Element &a) const >- {return result = a.Doubled(m_ring);} >+ {return this->result = a.Doubled(m_ring);} > > const Element& MultiplicativeIdentity() const >- {return result = m_ring.MultiplicativeIdentity();} >+ {return this->result = m_ring.MultiplicativeIdentity();} > > const Element& Multiply(const Element &a, const Element &b) const >- {return result = a.Times(b, m_ring);} >+ {return this->result = a.Times(b, m_ring);} > > const Element& Square(const Element &a) const >- {return result = a.Squared(m_ring);} >+ {return this->result = a.Squared(m_ring);} > > bool IsUnit(const Element &a) const > {return a.IsUnit(m_ring);} > > const Element& MultiplicativeInverse(const Element &a) const >- {return result = a.MultiplicativeInverse(m_ring);} >+ {return this->result = a.MultiplicativeInverse(m_ring);} > > const Element& Divide(const Element &a, const Element &b) const >- {return result = a.DividedBy(b, m_ring);} >+ {return this->result = a.DividedBy(b, m_ring);} > > const Element& Mod(const Element &a, const Element &b) const >- {return result = a.Modulo(b, m_ring);} >+ {return this->result = a.Modulo(b, m_ring);} > > void DivisionAlgorithm(Element &r, Element &q, const Element &a, const Element &d) const > {Element::Divide(r, q, a, d, m_ring);} >@@ -391,7 +391,7 @@ > //! > template <class T, int instance> > inline bool operator==(const CryptoPP::PolynomialOverFixedRing<T, instance> &a, const CryptoPP::PolynomialOverFixedRing<T, instance> &b) >- {return a.Equals(b, fixedRing);} >+ {return a.Equals(b, T::fixedRing);} > //! > template <class T, int instance> > inline bool operator!=(const CryptoPP::PolynomialOverFixedRing<T, instance> &a, const CryptoPP::PolynomialOverFixedRing<T, instance> &b) >@@ -417,23 +417,23 @@ > //! > template <class T, int instance> > inline CryptoPP::PolynomialOverFixedRing<T, instance> operator+(const CryptoPP::PolynomialOverFixedRing<T, instance> &a, const CryptoPP::PolynomialOverFixedRing<T, instance> &b) >- {return CryptoPP::PolynomialOverFixedRing<T, instance>(a.Plus(b, fixedRing));} >+ {return CryptoPP::PolynomialOverFixedRing<T, instance>(a.Plus(b, T::fixedRing));} > //! > template <class T, int instance> > inline CryptoPP::PolynomialOverFixedRing<T, instance> operator-(const CryptoPP::PolynomialOverFixedRing<T, instance> &a, const CryptoPP::PolynomialOverFixedRing<T, instance> &b) >- {return CryptoPP::PolynomialOverFixedRing<T, instance>(a.Minus(b, fixedRing));} >+ {return CryptoPP::PolynomialOverFixedRing<T, instance>(a.Minus(b, T::fixedRing));} > //! > template <class T, int instance> > inline CryptoPP::PolynomialOverFixedRing<T, instance> operator*(const CryptoPP::PolynomialOverFixedRing<T, instance> &a, const CryptoPP::PolynomialOverFixedRing<T, instance> &b) >- {return CryptoPP::PolynomialOverFixedRing<T, instance>(a.Times(b, fixedRing));} >+ {return CryptoPP::PolynomialOverFixedRing<T, instance>(a.Times(b, T::fixedRing));} > //! > template <class T, int instance> > inline CryptoPP::PolynomialOverFixedRing<T, instance> operator/(const CryptoPP::PolynomialOverFixedRing<T, instance> &a, const CryptoPP::PolynomialOverFixedRing<T, instance> &b) >- {return CryptoPP::PolynomialOverFixedRing<T, instance>(a.DividedBy(b, fixedRing));} >+ {return CryptoPP::PolynomialOverFixedRing<T, instance>(a.DividedBy(b, T::fixedRing));} > //! > template <class T, int instance> > inline CryptoPP::PolynomialOverFixedRing<T, instance> operator%(const CryptoPP::PolynomialOverFixedRing<T, instance> &a, const CryptoPP::PolynomialOverFixedRing<T, instance> &b) >- {return CryptoPP::PolynomialOverFixedRing<T, instance>(a.Modulo(b, fixedRing));} >+ {return CryptoPP::PolynomialOverFixedRing<T, instance>(a.Modulo(b, T::fixedRing));} > > NAMESPACE_END > >diff -ru --exclude='*~' crypto++-5.1/pubkey.h crypto++-5.1.gcc34/pubkey.h >--- crypto++-5.1/pubkey.h 2003-03-20 04:18:53.000000000 +0100 >+++ crypto++-5.1.gcc34/pubkey.h 2004-04-30 12:48:45.000000000 +0200 >@@ -36,6 +36,7 @@ > #include "filters.h" > #include "eprecomp.h" > #include "fips140.h" >+#include "modarith.h" > #include "argnames.h" > #include <memory> > >@@ -142,12 +143,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;} > }; > > //! . >@@ -288,7 +289,7 @@ > class PK_MessageAccumulatorImpl : public PK_MessageAccumulatorBase, protected ObjectHolder<HASH_ALGORITHM> > { > public: >- HashTransformation & AccessHash() {return m_object;} >+ HashTransformation & AccessHash() {return this->m_object;} > }; > > //! . >@@ -297,22 +298,22 @@ > { > 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; > }; >@@ -401,7 +402,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 >@@ -446,7 +447,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();} > }; > > //! . >@@ -454,8 +455,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();} > }; > > //! . >@@ -674,23 +675,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> ¶ms = GetAbstractGroupParameters(); >+ const DL_GroupParameters<T> ¶ms = this->GetAbstractGroupParameters(); > return GetPublicPrecomputation().Exponentiate(params.GetGroupPrecomputation(), exponent); > } > virtual Element CascadeExponentiateBaseAndPublicElement(const Integer &baseExp, const Integer &publicExp) const > { >- const DL_GroupParameters<T> ¶ms = GetAbstractGroupParameters(); >+ const DL_GroupParameters<T> ¶ms = this->GetAbstractGroupParameters(); > return params.GetBasePrecomputation().CascadeExponentiate(params.GetGroupPrecomputation(), baseExp, GetPublicPrecomputation(), publicExp); > } > >@@ -709,19 +710,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); > } >@@ -738,7 +739,7 @@ > pPrivateKey->MakePublicKey(*this); > else > { >- AccessAbstractGroupParameters().AssignFrom(source); >+ this->AccessAbstractGroupParameters().AssignFrom(source); > AssignFromHelper(this, source) > CRYPTOPP_SET_FUNCTION_ENTRY(PublicElement); > } >@@ -806,8 +807,8 @@ > > void GenerateRandom(RandomNumberGenerator &rng, const NameValuePairs ¶ms) > { >- 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(), >@@ -827,8 +828,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;} >@@ -873,7 +874,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; > } > >@@ -908,8 +909,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;} >@@ -917,7 +918,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; >@@ -991,8 +992,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());} >@@ -1008,7 +1009,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; >@@ -1024,9 +1025,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> ¶ms = GetAbstractGroupParameters(); >- const DL_PrivateKey<T> &key = GetKeyInterface(); >+ const DL_ElgamalLikeSignatureAlgorithm<T> &alg = this->GetSignatureAlgorithm(); >+ const DL_GroupParameters<T> ¶ms = this->GetAbstractGroupParameters(); >+ const DL_PrivateKey<T> &key = this->GetKeyInterface(); > > r = params.ConvertElementToInteger(params.ExponentiateBase(k)); > alg.Sign(params, key.GetPrivateExponent(), k, e, r, s); >@@ -1036,7 +1037,7 @@ > { > PK_MessageAccumulatorBase &ma = static_cast<PK_MessageAccumulatorBase &>(messageAccumulator); > ma.m_recoverableMessage.Assign(recoverableMessage, recoverableMessageLength); >- GetMessageEncodingInterface().ProcessRecoverableMessage(ma.AccessHash(), >+ this->GetMessageEncodingInterface().ProcessRecoverableMessage(ma.AccessHash(), > recoverableMessage, recoverableMessageLength, > ma.m_presignature, ma.m_presignature.size(), > ma.m_semisignature); >@@ -1044,24 +1045,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> ¶ms = GetAbstractGroupParameters(); >- const DL_PrivateKey<T> &key = GetKeyInterface(); >+ const DL_ElgamalLikeSignatureAlgorithm<T> &alg = this->GetSignatureAlgorithm(); >+ const DL_GroupParameters<T> ¶ms = this->GetAbstractGroupParameters(); >+ const DL_PrivateKey<T> &key = this->GetKeyInterface(); > >- SecByteBlock representative(MessageRepresentativeLength()); >- GetMessageEncodingInterface().ComputeMessageRepresentative( >+ 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()); >@@ -1075,14 +1076,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> ¶ms = GetAbstractGroupParameters(); >+ const DL_ElgamalLikeSignatureAlgorithm<T> &alg = this->GetSignatureAlgorithm(); >+ const DL_GroupParameters<T> ¶ms = 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()); >@@ -1097,29 +1098,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> ¶ms = GetAbstractGroupParameters(); >+ const DL_ElgamalLikeSignatureAlgorithm<T> &alg = this->GetSignatureAlgorithm(); >+ const DL_GroupParameters<T> ¶ms = 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> ¶ms = GetAbstractGroupParameters(); >- const DL_PublicKey<T> &key = GetKeyInterface(); >- >- SecByteBlock representative(MessageRepresentativeLength()); >- GetMessageEncodingInterface().ComputeMessageRepresentative(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> ¶ms = 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()); > >@@ -1129,19 +1130,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> ¶ms = GetAbstractGroupParameters(); >- const DL_PublicKey<T> &key = GetKeyInterface(); >+ const DL_ElgamalLikeSignatureAlgorithm<T> &alg = this->GetSignatureAlgorithm(); >+ const DL_GroupParameters<T> ¶ms = this->GetAbstractGroupParameters(); >+ const DL_PublicKey<T> &key = this->GetKeyInterface(); > >- SecByteBlock representative(MessageRepresentativeLength()); >- GetMessageEncodingInterface().ComputeMessageRepresentative( >+ 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()); > >@@ -1149,8 +1150,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); >@@ -1166,14 +1167,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: >@@ -1193,11 +1194,11 @@ > { > try > { >- const DL_KeyAgreementAlgorithm<T> &agreeAlg = GetKeyAgreementAlgorithm(); >- const DL_KeyDerivationAlgorithm<T> &derivAlg = GetKeyDerivationAlgorithm(); >- const DL_SymmetricEncryptionAlgorithm &encAlg = GetSymmetricEncryptionAlgorithm(); >- const DL_GroupParameters<T> ¶ms = 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> ¶ms = this->GetAbstractGroupParameters(); >+ const DL_PrivateKey<T> &key = this->GetKeyInterface(); > > Element q = params.DecodeElement(cipherText, true); > unsigned int elementSize = params.GetEncodedElementSize(true); >@@ -1227,11 +1228,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> ¶ms = 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> ¶ms = this->GetAbstractGroupParameters(); >+ const DL_PublicKey<T> &key = this->GetKeyInterface(); > > Integer x(rng, Integer::One(), params.GetMaxExponent()); > Element q = params.ExponentiateBase(x); >@@ -1307,7 +1308,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 >@@ -1348,7 +1349,7 @@ > { > public: > void CopyKeyInto(typename SCHEME_OPTIONS::PublicKey &key) const >- {key = GetKey();} >+ {key = this->GetKey();} > }; > > //! . >@@ -1357,9 +1358,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();} > }; > > //! . >@@ -1369,7 +1370,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(); > } > }; >@@ -1518,19 +1519,19 @@ > 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);} > > #if (defined(_MSC_VER) && _MSC_VER < 1300) > >@@ -1566,59 +1567,59 @@ > > 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);} > > #endif > }; >diff -ru --exclude='*~' crypto++-5.1/pwdbased.h crypto++-5.1.gcc34/pwdbased.h >--- crypto++-5.1/pwdbased.h 2002-10-04 19:31:54.000000000 +0200 >+++ crypto++-5.1.gcc34/pwdbased.h 2004-04-30 13:22:22.633449752 +0200 >@@ -51,7 +51,7 @@ > template <class T> > void PKCS5_PBKDF1<T>::DeriveKey(byte *derived, unsigned int derivedLen, const byte *password, unsigned int passwordLen, const byte *salt, unsigned int saltLen, unsigned int iterations) const > { >- assert(derivedLen <= MaxDerivedLength()); >+ assert(derivedLen <= this->MaxDerivedLength()); > assert(iterations > 0); > > T hash; >diff -ru --exclude='*~' crypto++-5.1/seckey.h crypto++-5.1.gcc34/seckey.h >--- crypto++-5.1/seckey.h 2002-11-19 21:44:40.000000000 +0100 >+++ crypto++-5.1.gcc34/seckey.h 2004-04-29 22:40:21.000000000 +0200 >@@ -156,7 +156,7 @@ > class BlockCipherBaseTemplate : public AlgorithmImpl<SimpleKeyingInterfaceImpl<TwoBases<INFO, INTERFACE> > > > { > public: >- unsigned int BlockSize() const {return BLOCKSIZE;} >+ unsigned int BlockSize() const {return this->BLOCKSIZE;} > }; > > //! . >@@ -166,11 +166,11 @@ > public: > 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;} > >@@ -194,11 +194,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 ¶m = g_nullNameValuePairs) > { >diff -ru --exclude='*~' crypto++-5.1/shark.cpp crypto++-5.1.gcc34/shark.cpp >--- crypto++-5.1/shark.cpp 2003-03-20 21:39:59.000000000 +0100 >+++ crypto++-5.1.gcc34/shark.cpp 2004-04-30 13:08:52.000000000 +0200 >@@ -82,7 +82,7 @@ > for (unsigned int i=0; i<DEFAULT_ROUNDS; i++) > m_roundKeys[i] = cbox[0][i]; > >- m_roundKeys[DEFAULT_ROUNDS] = SHARKTransform(cbox[0][DEFAULT_ROUNDS]); >+ ((word64*)m_roundKeys)[DEFAULT_ROUNDS] = SHARKTransform(cbox[0][DEFAULT_ROUNDS]); > > #ifdef IS_LITTLE_ENDIAN > m_roundKeys[0] = ByteReverse(m_roundKeys[0]); >diff -ru --exclude='*~' crypto++-5.1/simple.h crypto++-5.1.gcc34/simple.h >--- crypto++-5.1/simple.h 2003-03-20 02:24:12.000000000 +0100 >+++ crypto++-5.1.gcc34/simple.h 2004-04-29 22:39:54.000000000 +0200 >@@ -68,7 +68,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) >@@ -77,7 +77,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; > } > } >@@ -131,24 +131,24 @@ > Multichannel(BufferedTransformation *q) : CustomSignalPropagation<T>(q) {} > > void Initialize(const NameValuePairs ¶meters, 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) >diff -ru --exclude='*~' crypto++-5.1/smartptr.h crypto++-5.1.gcc34/smartptr.h >--- crypto++-5.1/smartptr.h 2002-10-04 19:31:58.000000000 +0200 >+++ crypto++-5.1.gcc34/smartptr.h 2004-04-29 22:41:17.000000000 +0200 >@@ -2,6 +2,7 @@ > #define CRYPTOPP_SMARTPTR_H > > #include "config.h" >+#include "misc.h" > #include <algorithm> > > NAMESPACE_BEGIN(CryptoPP) >@@ -54,14 +55,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; > } >@@ -81,8 +82,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; > } >diff -ru --exclude='*~' crypto++-5.1/square.cpp crypto++-5.1.gcc34/square.cpp >--- crypto++-5.1/square.cpp 2002-10-04 19:31:58.000000000 +0200 >+++ crypto++-5.1.gcc34/square.cpp 2004-04-30 13:10:10.000000000 +0200 >@@ -62,7 +62,7 @@ > for (int i = 0; i < ROUNDS/2; i++) > for (int j = 0; j < 4; j++) > std::swap(roundkeys[i][j], roundkeys[ROUNDS-i][j]); >- SquareTransform (roundkeys[ROUNDS], roundkeys[ROUNDS]); >+ SquareTransform (((word32(*)[4])roundkeys)[ROUNDS], ((word32(*)[4])roundkeys)[ROUNDS]); > } > } > >diff -ru --exclude='*~' crypto++-5.1/strciphr.cpp crypto++-5.1.gcc34/strciphr.cpp >--- crypto++-5.1/strciphr.cpp 2003-03-20 21:39:59.000000000 +0100 >+++ crypto++-5.1.gcc34/strciphr.cpp 2004-04-30 13:00:21.000000000 +0200 >@@ -8,7 +8,7 @@ > template <class S> > byte AdditiveCipherTemplate<S>::GenerateByte() > { >- PolicyInterface &policy = AccessPolicy(); >+ PolicyInterface &policy = this->AccessPolicy(); > > if (m_leftOver == 0) > { >@@ -37,7 +37,7 @@ > > assert(m_leftOver == 0); > >- PolicyInterface &policy = AccessPolicy(); >+ PolicyInterface &policy = this->AccessPolicy(); > unsigned int bytesPerIteration = policy.GetBytesPerIteration(); > unsigned int alignment = policy.GetAlignment(); > >@@ -81,7 +81,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); >@@ -90,7 +90,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); >@@ -108,7 +108,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(); > } >@@ -116,7 +116,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 -ru --exclude='*~' crypto++-5.1/strciphr.h crypto++-5.1.gcc34/strciphr.h >--- crypto++-5.1/strciphr.h 2002-11-19 21:44:40.000000000 +0100 >+++ crypto++-5.1.gcc34/strciphr.h 2004-04-29 22:42:11.000000000 +0200 >@@ -123,12 +123,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; >@@ -165,7 +165,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 >@@ -215,9 +215,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;} > >@@ -251,16 +251,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 ¶ms = 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));} >@@ -269,7 +269,7 @@ > template <class S> > void AdditiveCipherTemplate<S>::UncheckedSetKey(const NameValuePairs ¶ms, 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; >@@ -278,7 +278,7 @@ > template <class BASE> > void CFB_CipherTemplate<BASE>::UncheckedSetKey(const NameValuePairs ¶ms, const byte *key, unsigned int length) > { >- PolicyInterface &policy = AccessPolicy(); >+ PolicyInterface &policy = this->AccessPolicy(); > policy.CipherSetKey(params, key, length); > m_leftOver = policy.GetBytesPerIteration(); > } >diff -ru --exclude='*~' crypto++-5.1/xormac.h crypto++-5.1.gcc34/xormac.h >--- crypto++-5.1/xormac.h 2002-10-04 19:32:02.000000000 +0200 >+++ crypto++-5.1.gcc34/xormac.h 2004-04-30 13:25:29.384059344 +0200 >@@ -5,6 +5,7 @@ > > #include "iterhash.h" > #include "argnames.h" >+#include "algparam.h" > > NAMESPACE_BEGIN(CryptoPP) > >@@ -25,7 +26,7 @@ > void Resynchronize(const byte *IV) > { > GetWord(false, BIG_ENDIAN_ORDER, m_counter, IV); >- Restart(); >+ this->Restart(); > } > unsigned int IVSize() const > {return 4;} >@@ -65,26 +66,26 @@ > public: > XMACC() {} > XMACC(const byte *key, word32 counter = 0xffffffff) >- {SetKey(key, KEYLENGTH, MakeParameters(Name::XMACC_Counter(), counter));} >+ {this->SetKey(key, this->KEYLENGTH, MakeParameters(Name::XMACC_Counter(), counter));} > }; > > template <class T> void XMACC_Base<T>::CheckedSetKey(void *, Empty empty, const byte *key, unsigned int length, const NameValuePairs ¶ms) > { >- ThrowIfInvalidKeyLength(length); >+ this->ThrowIfInvalidKeyLength(length); > m_counter = 0xffffffff; > const byte *iv = NULL; > if (params.GetValue(Name::IV(), iv)) > GetWord(false, BIG_ENDIAN_ORDER, m_counter, iv); > else > params.GetValue(Name::XMACC_Counter(), m_counter); >- memcpy(m_key, key, KEYLENGTH); >+ memcpy(m_key, key, this->KEYLENGTH); > Init(); > } > > template <class T> void XMACC_Base<T>::Init() > { > m_index = 0x80000000; >- memset(m_digest, 0, T::DIGESTSIZE); >+ memset(this->m_digest, 0, T::DIGESTSIZE); > } > > template <class T> inline void XMACC_Base<T>::WriteWord32(byte *output, word32 value) >@@ -103,65 +104,65 @@ > > template <class T> void XMACC_Base<T>::vTransform(const HashWordType *input) > { >- memcpy(m_buffer, m_key, KEYLENGTH); >- WriteWord32((byte *)m_buffer.begin()+KEYLENGTH, ++m_index); >+ memcpy(m_buffer, m_key, this->KEYLENGTH); >+ WriteWord32((byte *)m_buffer.begin()+this->KEYLENGTH, ++m_index); > T::CorrectEndianess(m_buffer, m_buffer, T::DIGESTSIZE); > T::Transform(m_buffer, input); >- XorDigest(m_digest, m_buffer); >+ XorDigest(this->m_digest, m_buffer); > } > > template <class T> void XMACC_Base<T>::TruncatedFinal(byte *mac, unsigned int size) > { >- ThrowIfInvalidTruncatedSize(size); >+ this->ThrowIfInvalidTruncatedSize(size); > if (size < 4) > throw InvalidArgument("XMACC: truncating the MAC to less than 4 bytes will cause it to be unverifiable"); > if (m_counter == 0xffffffff) > throw InvalidArgument("XMACC: the counter must be initialized to a valid value for MAC generation"); > >- PadLastBlock(BLOCKSIZE - 2*sizeof(HashWordType)); >- CorrectEndianess(m_data, m_data, BLOCKSIZE - 2*sizeof(HashWordType)); >- m_data[m_data.size()-2] = ByteReverse(GetBitCountHi()); // byteReverse for backwards compatibility >- m_data[m_data.size()-1] = ByteReverse(GetBitCountLo()); >- vTransform(m_data); >- >- memcpy(m_buffer, m_key, KEYLENGTH); >- WriteWord32((byte *)m_buffer.begin()+KEYLENGTH, 0); >- memset(m_data, 0, BLOCKSIZE-4); >- WriteWord32((byte *)m_data.begin()+BLOCKSIZE-4, ++m_counter); >+ 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] = ByteReverse(this->GetBitCountHi()); // byteReverse for backwards compatibility >+ this->m_data[this->m_data.size()-1] = ByteReverse(this->GetBitCountLo()); >+ vTransform(this->m_data); >+ >+ memcpy(m_buffer, m_key, this->KEYLENGTH); >+ WriteWord32((byte *)m_buffer.begin()+this->KEYLENGTH, 0); >+ memset(this->m_data, 0, this->BLOCKSIZE-4); >+ WriteWord32((byte *)this->m_data.begin()+this->BLOCKSIZE-4, ++m_counter); > T::CorrectEndianess(m_buffer, m_buffer, T::DIGESTSIZE); >- T::CorrectEndianess(m_data, m_data, BLOCKSIZE); >- T::Transform(m_buffer, m_data); >- XorDigest(m_digest, m_buffer); >+ T::CorrectEndianess(this->m_data, this->m_data, this->BLOCKSIZE); >+ T::Transform(m_buffer, this->m_data); >+ XorDigest(this->m_digest, m_buffer); > > WriteWord32(mac, m_counter); >- T::CorrectEndianess(m_digest, m_digest, T::DIGESTSIZE); >- memcpy(mac+4, m_digest, size-4); >+ T::CorrectEndianess(this->m_digest, this->m_digest, T::DIGESTSIZE); >+ memcpy(mac+4, this->m_digest, size-4); > >- Restart(); // reinit for next use >+ this->Restart(); // reinit for next use > } > > template <class T> bool XMACC_Base<T>::TruncatedVerify(const byte *mac, unsigned int size) > { > assert(4 <= size && size <= DIGESTSIZE); > >- PadLastBlock(BLOCKSIZE - 2*sizeof(HashWordType)); >- CorrectEndianess(m_data, m_data, BLOCKSIZE - 2*sizeof(HashWordType)); >- m_data[m_data.size()-2] = ByteReverse(GetBitCountHi()); // byteReverse for backwards compatibility >- m_data[m_data.size()-1] = ByteReverse(GetBitCountLo()); >- vTransform(m_data); >- >- memcpy(m_buffer, m_key, KEYLENGTH); >- WriteWord32((byte *)m_buffer.begin()+KEYLENGTH, 0); >- memset(m_data, 0, BLOCKSIZE-4); >- memcpy((byte *)m_data.begin()+BLOCKSIZE-4, mac, 4); >+ this->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] = ByteReverse(this->GetBitCountHi()); // byteReverse for backwards compatibility >+ this->m_data[this->m_data.size()-1] = ByteReverse(this->GetBitCountLo()); >+ vTransform(this->m_data); >+ >+ memcpy(m_buffer, m_key, this->KEYLENGTH); >+ WriteWord32((byte *)m_buffer.begin()+this->KEYLENGTH, 0); >+ memset(this->m_data, 0, this->BLOCKSIZE-4); >+ memcpy((byte *)this->m_data.begin()+this->BLOCKSIZE-4, mac, 4); > T::CorrectEndianess(m_buffer, m_buffer, T::DIGESTSIZE); >- T::CorrectEndianess(m_data, m_data, BLOCKSIZE); >- T::Transform(m_buffer, m_data); >- XorDigest(m_digest, m_buffer); >- >- T::CorrectEndianess(m_digest, m_digest, T::DIGESTSIZE); >- bool macValid = (memcmp(mac+4, m_digest, size-4) == 0); >- Restart(); // reinit for next use >+ T::CorrectEndianess(this->m_data, this->m_data, this->BLOCKSIZE); >+ T::Transform(m_buffer, this->m_data); >+ XorDigest(this->m_digest, m_buffer); >+ >+ T::CorrectEndianess(this->m_digest, this->m_digest, T::DIGESTSIZE); >+ bool macValid = (memcmp(mac+4, this->m_digest, size-4) == 0); >+ this->Restart(); // reinit for next use > return macValid; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 49449
: 30386