Index: sources/utility/encryption.cpp =================================================================== diff -u -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 -rf8c7febe2e4131b8c7e68fd9849027ba8596dbc6 --- sources/utility/encryption.cpp (.../encryption.cpp) (revision 2ef03b2ce51b4dc507f66e9671953a8e0824bde9) +++ sources/utility/encryption.cpp (.../encryption.cpp) (revision f8c7febe2e4131b8c7e68fd9849027ba8596dbc6) @@ -71,6 +71,14 @@ int iter = 10000; // https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html#pbkdf2 int len = 16; + QString mString = vString; + +// DEBUG after enabling the TEST_HASH micro go to standby->settings->service->touch/click confirm (no password entry needed.) +// #define TEST_HASH "pQs$e18@dJnYCy27" +#ifdef TEST_HASH + QString mString = TEST_HASH; +#endif + ok = vAddMoreSalt ? ! __salt__.isEmpty() : true; auto shuffle = [](const QString &vString) -> QByteArray { auto reverse = [](const QString &vString) -> QString { @@ -102,8 +110,10 @@ QCryptographicHash::Algorithm algorithm = QCryptographicHash::Sha512; QString salt = fixSalt() + (vAddMoreSalt ? __salt__ : ""); //DEBUG: qDebug() << "salt:" << salt; - QByteArray hashed = QPasswordDigestor::deriveKeyPbkdf2(algorithm, vString.toUtf8(), shuffle( salt ), iter, len).toHex(); - //DEBUG: qDebug() << "hashed:" << vString << hashed; + QByteArray hashed = QPasswordDigestor::deriveKeyPbkdf2(algorithm, mString.toUtf8(), shuffle( salt ), iter, len).toHex(); +#ifdef TEST_HASH + qDebug() << "hashed:" << mString << hashed; +#endif return hashed; }