I cannot understand how to return a hashed string from function temporary memory (don't know how to correctly call it). Now, I have this code:
static const QString &Utils::md5(const QString &inStr)
{
const QByteArray out = QCryptographicHash
::hash(inStr.toUtf8(), QCryptographicHash::Md5)
.toHex();
return QString(out);
}
But it gives warning during compilation and after I run my program it crashes.