I always said myself to not work at night...
However, I did it with the following code
if (usernames.contains(username.trimmed()))
{
p = passwords.at(usernames.indexOf(username));
qDebug()<<"LD password"
"input"<<p<<QCryptographicHash::hash(password.toLocal8Bit(),QCryptographicHash::Md4).toHex();
in
= QString::fromLocal8Bit(QCryptographicHash
::hash(password.
toLocal8Bit(),QCryptographicHash
::Md4).
toHex());
if ( in == p)
{
qDebug()<<"ACCEPTED"<< p.toLocal8Bit() << in;
return true;
}
else
{
qDebug()<<"NO ACCEPTED"<<in<<p<<in.size()<<in.size();
return false;
SleeperThread::msleep(900);
}
}
if (usernames.contains(username.trimmed()))
{
p = passwords.at(usernames.indexOf(username));
qDebug()<<"LD password"
"input"<<p<<QCryptographicHash::hash(password.toLocal8Bit(),QCryptographicHash::Md4).toHex();
in = QString::fromLocal8Bit(QCryptographicHash::hash(password.toLocal8Bit(),QCryptographicHash::Md4).toHex());
if ( in == p)
{
qDebug()<<"ACCEPTED"<< p.toLocal8Bit() << in;
return true;
}
else
{
qDebug()<<"NO ACCEPTED"<<in<<p<<in.size()<<in.size();
return false;
SleeperThread::msleep(900);
}
}
To copy to clipboard, switch view to plain text mode
where the password is stored in a file as heX.
Regards
Bookmarks