summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/msn/msnchallengehandler.cpp
diff options
context:
space:
mode:
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;