2 msnchallengehandler.h - Computes a msn challenge response hash key.
4 Copyright (c) 2005 by Gregg Edghill <gregg.edghill@gmail.com>
5 Kopete (c) 2003-2005 by The Kopete developers <kopete-devel@kde.org>
8 http://msnpiki.msnfanatic.com/index.php/MSNP11:Challenges
10 *************************************************************************
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
17 *************************************************************************
20 #ifndef MSNCHALLENGEHANDLER_H
21 #define MSNCHALLENGEHANDLER_H
27 * Provides a simple way to compute a msn challenge response hash key.
29 * @author Gregg Edghill
31 class MSNChallengeHandler
: public QObject
35 MSNChallengeHandler(const QString
& productKey
, const QString
& productId
);
36 ~MSNChallengeHandler();
39 * Computes the response hash string for the specified challenge string.
41 QString
computeHash(const QString
& challengeString
);
44 * Returns the product id used by the challenge handler.
51 * Creates a 64-bit hash key.
53 qint64
createHashKey(const QVector
<qint32
>& md5Integers
, const QVector
<qint32
>& challengeIntegers
);
56 * Swaps the bytes in a hex string.
58 QString
hexSwap(const QString
& in
);