summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/msn/msnchallengehandler.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
commit69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch)
tree073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kopete/protocols/msn/msnchallengehandler.cpp
parent3467e6464beac3a162839bf7078e22e3a74d73e7 (diff)
downloadtdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz
tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/msn/msnchallengehandler.cpp')
-rw-r--r--kopete/protocols/msn/msnchallengehandler.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/kopete/protocols/msn/msnchallengehandler.cpp b/kopete/protocols/msn/msnchallengehandler.cpp
index 46d4b8a0..5492b9e7 100644
--- a/kopete/protocols/msn/msnchallengehandler.cpp
+++ b/kopete/protocols/msn/msnchallengehandler.cpp
@@ -46,8 +46,8 @@ TQString MSNChallengeHandler::computeHash(const TQString& challengeString)
kdDebug(14140) << k_funcinfo << "md5: " << digest << endl;
- TQValueVector<Q_INT32> md5Integers(4);
- for(Q_UINT32 i=0; i < md5Integers.count(); i++)
+ TQValueVector<TQ_INT32> md5Integers(4);
+ for(TQ_UINT32 i=0; i < md5Integers.count(); i++)
{
md5Integers[i] = hexSwap(digest.mid(i*8, 8)).toUInt(0, 16) & 0x7FFFFFFF;
kdDebug(14140) << k_funcinfo << ("0x" + hexSwap(digest.mid(i*8, 8))) << " " << md5Integers[i] << endl;
@@ -61,8 +61,8 @@ TQString MSNChallengeHandler::computeHash(const TQString& challengeString)
kdDebug(14140) << k_funcinfo << "challenge key: " << challengeKey << endl;
- TQValueVector<Q_INT32> challengeIntegers(challengeKey.length() / 4);
- for(Q_UINT32 i=0; i < challengeIntegers.count(); i++)
+ TQValueVector<TQ_INT32> challengeIntegers(challengeKey.length() / 4);
+ for(TQ_UINT32 i=0; i < challengeIntegers.count(); i++)
{
TQString sNum = challengeKey.mid(i*4, 4), sNumHex;
@@ -82,7 +82,7 @@ TQString MSNChallengeHandler::computeHash(const TQString& challengeString)
// Step Three: Create the 64-bit hash key.
// Get the hash key using the specified arrays.
- Q_INT64 key = createHashKey(md5Integers, challengeIntegers);
+ TQ_INT64 key = createHashKey(md5Integers, challengeIntegers);
kdDebug(14140) << k_funcinfo << "key: " << key << endl;
// Step Four: Create the final hash key.
@@ -98,16 +98,16 @@ TQString MSNChallengeHandler::computeHash(const TQString& challengeString)
return (upper + lower);
}
-Q_INT64 MSNChallengeHandler::createHashKey(const TQValueVector<Q_INT32>& md5Integers,
- const TQValueVector<Q_INT32>& challengeIntegers)
+TQ_INT64 MSNChallengeHandler::createHashKey(const TQValueVector<TQ_INT32>& md5Integers,
+ const TQValueVector<TQ_INT32>& challengeIntegers)
{
kdDebug(14140) << k_funcinfo << "Creating 64-bit key." << endl;
- Q_INT64 magicNumber = 0x0E79A9C1L, high = 0L, low = 0L;
+ TQ_INT64 magicNumber = 0x0E79A9C1L, high = 0L, low = 0L;
for(uint i=0; i < challengeIntegers.count(); i += 2)
{
- Q_INT64 temp = ((challengeIntegers[i] * magicNumber) % 0x7FFFFFFF) + high;
+ TQ_INT64 temp = ((challengeIntegers[i] * magicNumber) % 0x7FFFFFFF) + high;
temp = ((temp * md5Integers[0]) + md5Integers[1]) % 0x7FFFFFFF;
high = (challengeIntegers[i + 1] + temp) % 0x7FFFFFFF;
@@ -121,12 +121,12 @@ Q_INT64 MSNChallengeHandler::createHashKey(const TQValueVector<Q_INT32>& md5Inte
TQDataStream buffer(TQByteArray(8), IO_ReadWrite);
buffer.setByteOrder(TQDataStream::LittleEndian);
- buffer << (Q_INT32)high;
- buffer << (Q_INT32)low;
+ buffer << (TQ_INT32)high;
+ buffer << (TQ_INT32)low;
buffer.device()->reset();
buffer.setByteOrder(TQDataStream::BigEndian);
- Q_INT64 key;
+ TQ_INT64 key;
buffer >> key;
return key;