KIO
kntlm.cpp
Go to the documentation of this file.
105static void addString (QByteArray &buf, KNTLM::SecBuf &secbuf, const QString &str, bool unicode = false)
134 bool needsParity = ((((b >> 7) ^ (b >> 6) ^ (b >> 5) ^ (b >> 4) ^ (b >> 3) ^ (b >> 2) ^ (b >> 1)) & 0x01) == 0);
196/*************************************** KNTLM implementation ***************************************/
198bool KNTLM::getNegotiate (QByteArray &negotiate, const QString &domain, const QString &workstation, quint32 flags)
254 (!targetInfo.isEmpty() && (qFromLittleEndian(ch->flags) & Negotiate_Target_Info))) /* may support NTLMv2 */) {
275 } else { //if no targetinfo structure and NTLMv2 or LMv2 not forced, or v1 forced, try the older methods
400QByteArray KNTLM::ntlmv2Hash (const QString &target, const QString &user, const QString &password)
static QByteArray lmResponse(const QByteArray &hash, const unsigned char *challenge)
Calculates the LanManager response from the LanManager hash and the server challenge.
Definition: kntlm.cpp:342
static QByteArray lmv2Response(const QByteArray &hash, const QByteArray &clientData, const unsigned char *challenge)
Calculates the LMv2 response.
Definition: kntlm.cpp:407
static QByteArray ntlmHash(const QString &password)
Returns the NTLM hash (MD4) from the password.
Definition: kntlm.cpp:370
static QByteArray getLMv2Response(const QString &target, const QString &user, const QString &password, const unsigned char *challenge)
Calculates the LMv2 response.
Definition: kntlm.cpp:387
static QByteArray getLMResponse(const QString &password, const unsigned char *challenge)
Returns the LanManager response from the password and the server challenge.
Definition: kntlm.cpp:309
static QByteArray ntlmv2Hash(const QString &target, const QString &user, const QString &password)
Returns the NTLMv2 hash.
Definition: kntlm.cpp:400
static QByteArray lmHash(const QString &password)
Calculates the LanManager hash of the specified password.
Definition: kntlm.cpp:321
static bool getAuth(QByteArray &auth, const QByteArray &challenge, const QString &user, const QString &password, const QString &domain=QString(), const QString &workstation=QString(), AuthFlags authflags=Add_LM)
Creates the type 3 message which should be sent to the server after the challenge (type 2) received.
Definition: kntlm.cpp:220
static QByteArray getNTLMv2Response(const QString &target, const QString &user, const QString &password, const QByteArray &targetInformation, const unsigned char *challenge)
Calculates the NTLMv2 response.
Definition: kntlm.cpp:378
static bool getNegotiate(QByteArray &negotiate, const QString &domain=QString(), const QString &workstation=QString(), quint32 flags=Negotiate_Unicode|Request_Target|Negotiate_NTLM)
Creates the initial message (type 1) which should be sent to the server.
Definition: kntlm.cpp:198
static QByteArray getNTLMResponse(const QString &password, const unsigned char *challenge)
Returns the NTLM response from the password and the server challenge.
Definition: kntlm.cpp:360
int ntlm_des_ecb_encrypt(const void *plaintext, int len, DES_KEY *akey, unsigned char output[8])
Definition: des.cpp:520
static QByteArray getBuf(const QByteArray &buf, const KNTLM::SecBuf &secbuf)
Definition: kntlm.cpp:60
static void addString(QByteArray &buf, KNTLM::SecBuf &secbuf, const QString &str, bool unicode=false)
Definition: kntlm.cpp:105
static QByteArray hmacMD5(const QByteArray &data, const QByteArray &key)
Definition: kntlm.cpp:166
static QString getString(const QByteArray &buf, const KNTLM::SecBuf &secbuf, bool unicode)
Definition: kntlm.cpp:86
static QString UnicodeLE2QString(const QChar *data, uint len)
Definition: kntlm.cpp:49
static void addBuf(QByteArray &buf, KNTLM::SecBuf &secbuf, const QByteArray &data)
Definition: kntlm.cpp:73
int random()
Definition: kntlm.h:124
Definition: kntlm.h:79
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.