![]() |
KVIrc
4.9.2
DeveloperAPIs
|
#include "qhttpauthenticator_p.h"#include <qdebug.h>#include <qhash.h>#include <qbytearray.h>#include <qcryptographichash.h>#include "qhttp.h"#include <qiodevice.h>#include <qdatastream.h>#include <qendian.h>#include <qstring.h>#include <qdatetime.h>Classes | |
| class | QNtlmBuffer |
| class | QNtlmPhase1Block |
| class | QNtlmPhase1BlockBase |
| class | QNtlmPhase2Block |
| class | QNtlmPhase2BlockBase |
| class | QNtlmPhase3Block |
| class | QNtlmPhase3BlockBase |
Macros | |
| #define | AVTIMESTAMP 7 |
| #define | NTLMSSP_NEGOTIATE_128 0x20000000 |
| #define | NTLMSSP_NEGOTIATE_56 0x80000000 |
| #define | NTLMSSP_NEGOTIATE_ALWAYS_SIGN 0x00008000 |
| #define | NTLMSSP_NEGOTIATE_DATAGRAM 0x00000040 |
| #define | NTLMSSP_NEGOTIATE_DOMAIN_SUPPLIED 0x00001000 |
| #define | NTLMSSP_NEGOTIATE_KEY_EXCHANGE 0x40000000 |
| #define | NTLMSSP_NEGOTIATE_LM_KEY 0x00000080 |
| #define | NTLMSSP_NEGOTIATE_LOCAL_CALL 0x00004000 |
| #define | NTLMSSP_NEGOTIATE_NTLM 0x00000200 |
| #define | NTLMSSP_NEGOTIATE_NTLM2 0x00080000 |
| #define | NTLMSSP_NEGOTIATE_OEM 0x00000002 |
| #define | NTLMSSP_NEGOTIATE_SEAL 0x00000020 |
| #define | NTLMSSP_NEGOTIATE_SIGN 0x00000010 |
| #define | NTLMSSP_NEGOTIATE_TARGET_INFO 0x00800000 |
| #define | NTLMSSP_NEGOTIATE_UNICODE 0x00000001 |
| #define | NTLMSSP_NEGOTIATE_WORKSTATION_SUPPLIED 0x00002000 |
| #define | NTLMSSP_REQUEST_TARGET 0x00000004 |
| #define | NTLMSSP_TARGET_TYPE_DOMAIN 0x00010000 |
| #define | NTLMSSP_TARGET_TYPE_SERVER 0x00020000 |
| #define | NTLMSSP_TARGET_TYPE_SHARE 0x00040000 |
Functions | |
| static QByteArray | clientChallenge (const QHttpAuthenticatorPrivate *ctx) |
| static QByteArray | digestMd5ResponseHelper (const QByteArray &alg, const QByteArray &userName, const QByteArray &realm, const QByteArray &password, const QByteArray &nonce, const QByteArray &nonceCount, const QByteArray &cNonce, const QByteArray &qop, const QByteArray &method, const QByteArray &digestUri, const QByteArray &hEntity) |
| static QDataStream & | operator<< (QDataStream &s, const QNtlmBuffer &b) |
| static QDataStream & | operator<< (QDataStream &s, const QNtlmPhase1Block &b) |
| static QDataStream & | operator<< (QDataStream &s, const QNtlmPhase3Block &b) |
| static QDataStream & | operator>> (QDataStream &s, QNtlmBuffer &b) |
| static QByteArray | qCreatev2Hash (const QHttpAuthenticatorPrivate *ctx, QNtlmPhase3Block *phase3) |
| QByteArray | qEncodeHmacMd5 (QByteArray &key, const QByteArray &message) |
| static QByteArray | qEncodeLmv2Response (const QHttpAuthenticatorPrivate *ctx, const QNtlmPhase2Block &ch, QNtlmPhase3Block *phase3) |
| static int | qEncodeNtlmBuffer (QNtlmBuffer &buf, int offset, const QByteArray &s) |
| static int | qEncodeNtlmString (QNtlmBuffer &buf, int offset, const QString &s, bool unicode) |
| static QByteArray | qEncodeNtlmv2Response (const QHttpAuthenticatorPrivate *ctx, const QNtlmPhase2Block &ch, QNtlmPhase3Block *phase3) |
| static QByteArray | qExtractServerTime (const QByteArray &targetInfoBuff) |
| static bool | qNtlmDecodePhase2 (const QByteArray &data, QNtlmPhase2Block &ch) |
| static QT_BEGIN_NAMESPACE QByteArray | qNtlmPhase1 () |
| static QByteArray | qNtlmPhase3 (QHttpAuthenticatorPrivate *ctx, const QByteArray &phase2data) |
| static void | qStreamNtlmBuffer (QDataStream &ds, const QByteArray &s) |
| static void | qStreamNtlmString (QDataStream &ds, const QString &s, bool unicode) |
| static QByteArray | qStringAsUcs2Le (const QString &src) |
| static QString | qStringFromUcs2Le (const QByteArray &src) |
Variables | |
| const int | blockSize = 64 |
| const quint8 | hirespversion = 1 |
| const int | nDigestLen = 16 |
| const quint8 | respversion = 1 |
| #define AVTIMESTAMP 7 |
Referenced by qExtractServerTime().
| #define NTLMSSP_NEGOTIATE_128 0x20000000 |
| #define NTLMSSP_NEGOTIATE_56 0x80000000 |
| #define NTLMSSP_NEGOTIATE_ALWAYS_SIGN 0x00008000 |
| #define NTLMSSP_NEGOTIATE_DATAGRAM 0x00000040 |
| #define NTLMSSP_NEGOTIATE_DOMAIN_SUPPLIED 0x00001000 |
| #define NTLMSSP_NEGOTIATE_KEY_EXCHANGE 0x40000000 |
| #define NTLMSSP_NEGOTIATE_LM_KEY 0x00000080 |
| #define NTLMSSP_NEGOTIATE_LOCAL_CALL 0x00004000 |
| #define NTLMSSP_NEGOTIATE_NTLM 0x00000200 |
Referenced by QNtlmPhase1Block::QNtlmPhase1Block(), qNtlmPhase3(), and QNtlmPhase3Block::QNtlmPhase3Block().
| #define NTLMSSP_NEGOTIATE_NTLM2 0x00080000 |
| #define NTLMSSP_NEGOTIATE_OEM 0x00000002 |
Referenced by qNtlmPhase3().
| #define NTLMSSP_NEGOTIATE_SEAL 0x00000020 |
| #define NTLMSSP_NEGOTIATE_SIGN 0x00000010 |
| #define NTLMSSP_NEGOTIATE_TARGET_INFO 0x00800000 |
Referenced by QNtlmPhase3Block::QNtlmPhase3Block().
| #define NTLMSSP_NEGOTIATE_UNICODE 0x00000001 |
Referenced by operator<<(), QNtlmPhase1Block::QNtlmPhase1Block(), qNtlmPhase3(), and QNtlmPhase3Block::QNtlmPhase3Block().
| #define NTLMSSP_NEGOTIATE_WORKSTATION_SUPPLIED 0x00002000 |
| #define NTLMSSP_REQUEST_TARGET 0x00000004 |
Referenced by QNtlmPhase1Block::QNtlmPhase1Block().
| #define NTLMSSP_TARGET_TYPE_DOMAIN 0x00010000 |
| #define NTLMSSP_TARGET_TYPE_SERVER 0x00020000 |
| #define NTLMSSP_TARGET_TYPE_SHARE 0x00040000 |
|
static |
References QHttpAuthenticatorPrivate::cnonce.
Referenced by qEncodeLmv2Response(), and qEncodeNtlmv2Response().
|
static |
Referenced by QHttpAuthenticatorPrivate::digestMd5Response().
|
static |
References QNtlmBuffer::len, QNtlmBuffer::maxLen, QNtlmBuffer::offset, and s.
|
static |
|
static |
References QNtlmPhase3BlockBase::domain, QNtlmPhase3Block::domainStr, QNtlmPhase3BlockBase::flags, QNtlmPhase3BlockBase::lmResponse, QNtlmPhase3Block::lmResponseBuf, QNtlmPhase3BlockBase::magic, QNtlmPhase3BlockBase::ntlmResponse, QNtlmPhase3Block::ntlmResponseBuf, NTLMSSP_NEGOTIATE_UNICODE, qStreamNtlmBuffer(), qStreamNtlmString(), s, QNtlmPhase3BlockBase::sessionKey, QNtlmPhase3BlockBase::type, QNtlmPhase3BlockBase::user, QNtlmPhase3Block::userStr, QNtlmPhase3BlockBase::workstation, and QNtlmPhase3Block::workstationStr.
|
static |
References QNtlmBuffer::len, QNtlmBuffer::maxLen, QNtlmBuffer::offset, and s.
|
static |
| QByteArray qEncodeHmacMd5 | ( | QByteArray & | key, |
| const QByteArray & | message | ||
| ) |
Referenced by qCreatev2Hash(), qEncodeLmv2Response(), and qEncodeNtlmv2Response().
|
static |
References QNtlmPhase2BlockBase::challenge, clientChallenge(), qCreatev2Hash(), qEncodeHmacMd5(), and QNtlmPhase3Block::v2Hash.
Referenced by qNtlmPhase3().
|
static |
References QNtlmBuffer::len, QNtlmBuffer::maxLen, and QNtlmBuffer::offset.
Referenced by qEncodeNtlmString(), and qNtlmPhase3().
|
static |
References QNtlmBuffer::len, QNtlmBuffer::maxLen, QNtlmBuffer::offset, and qEncodeNtlmBuffer().
Referenced by qNtlmPhase3().
|
static |
|
static |
References AVTIMESTAMP.
Referenced by qEncodeNtlmv2Response().
|
static |
References QNtlmPhase2BlockBase::challenge, QNtlmPhase2BlockBase::context, QNtlmPhase2BlockBase::flags, QNtlmBuffer::len, QNtlmPhase2BlockBase::magic, QNtlmBuffer::offset, qStringFromUcs2Le(), QNtlmPhase2BlockBase::Size, QNtlmPhase2BlockBase::targetInfo, QNtlmPhase2Block::targetInfoBuff, QNtlmPhase2BlockBase::targetName, QNtlmPhase2Block::targetNameStr, and QNtlmPhase2BlockBase::type.
Referenced by qNtlmPhase3().
|
static |
Referenced by QHttpAuthenticatorPrivate::calculateResponse().
|
static |
References QNtlmPhase3BlockBase::domain, QNtlmPhase3Block::domainStr, QHttpAuthenticatorPrivate::extractedUser, QNtlmPhase2BlockBase::flags, QNtlmPhase3BlockBase::flags, QNtlmBuffer::len, QNtlmPhase3BlockBase::lmResponse, QNtlmPhase3Block::lmResponseBuf, QNtlmPhase3BlockBase::ntlmResponse, QNtlmPhase3Block::ntlmResponseBuf, NTLMSSP_NEGOTIATE_NTLM, NTLMSSP_NEGOTIATE_OEM, NTLMSSP_NEGOTIATE_UNICODE, qEncodeLmv2Response(), qEncodeNtlmBuffer(), qEncodeNtlmString(), qEncodeNtlmv2Response(), qNtlmDecodePhase2(), QNtlmPhase3BlockBase::Size, QNtlmPhase2BlockBase::targetInfo, QNtlmPhase2Block::targetNameStr, QNtlmPhase3BlockBase::user, QHttpAuthenticatorPrivate::userDomain, QNtlmPhase3Block::userStr, QHttpAuthenticatorPrivate::workstation, QNtlmPhase3BlockBase::workstation, and QNtlmPhase3Block::workstationStr.
Referenced by QHttpAuthenticatorPrivate::calculateResponse().
|
static |
Referenced by operator<<(), and qStreamNtlmString().
|
static |
References d, i, and qStreamNtlmBuffer().
Referenced by operator<<().
|
static |
Referenced by qCreatev2Hash().
|
static |
Referenced by qNtlmDecodePhase2().
| const int blockSize = 64 |
Referenced by qEncodeHmacMd5(), and QFtpDTP::writeData().
| const quint8 hirespversion = 1 |
Referenced by qEncodeNtlmv2Response().
| const int nDigestLen = 16 |
| const quint8 respversion = 1 |
Referenced by qEncodeNtlmv2Response().
1.8.7