KIO
kntlm.cpp
Go to the documentation of this file.
105 static 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 ***************************************/
198 bool 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
400 QByteArray KNTLM::ntlmv2Hash (const QString &target, const QString &user, const QString &password)
QString toUpper() const
Definition: kntlm.h:45
static QByteArray lmHash(const QString &password)
Calculates the LanManager hash of the specified password.
Definition: kntlm.cpp:321
Definition: kntlm.h:54
static void addBuf(QByteArray &buf, KNTLM::SecBuf &secbuf, const QByteArray &data)
Definition: kntlm.cpp:73
Definition: kntlm.h:53
QByteArray & fill(char ch, int size)
static QByteArray ntlmv2Hash(const QString &target, const QString &user, const QString &password)
Returns the NTLMv2 hash.
Definition: kntlm.cpp:400
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
int random()
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
void resize(int size)
static QString UnicodeLE2QString(const QChar *data, uint len)
Definition: kntlm.cpp:49
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 QByteArray hmacMD5(const QByteArray &data, const QByteArray &key)
Definition: kntlm.cpp:166
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
Definition: kntlm.h:79
bool isEmpty() const
static void addString(QByteArray &buf, KNTLM::SecBuf &secbuf, const QString &str, bool unicode=false)
Definition: kntlm.cpp:105
Definition: kntlm.h:72
Definition: kntlm.h:74
Definition: kntlm.h:55
static QString getString(const QByteArray &buf, const KNTLM::SecBuf &secbuf, bool unicode)
Definition: kntlm.cpp:86
uint toTime_t() const
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
Definition: kntlm.h:73
QDateTime currentDateTime()
QByteArray toLatin1() const
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
int length() const
char * data()
QByteArray hash(const QByteArray &data, Algorithm method)
Definition: kntlm.h:124
QString fromLatin1(const char *str, int size)
static QByteArray getLMv2Response(const QString &target, const QString &user, const QString &password, const unsigned char *challenge)
Calculates the LMv2 response.
Definition: kntlm.cpp:387
Definition: kntlm.h:65
static QByteArray getBuf(const QByteArray &buf, const KNTLM::SecBuf &secbuf)
Definition: kntlm.cpp:60
int size() const
int ntlm_des_ecb_encrypt(const void *plaintext, int len, DES_KEY *akey, unsigned char output[8])
Definition: des.cpp:520
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
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.