MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / derivePbkdf2

Function derivePbkdf2

app/src/Misc/PasswordHash.cpp:63–67  ·  view source on GitHub ↗

* @brief Standard PBKDF2-SHA256 derivation against a known salt and iteration count. */

Source from the content-addressed store, hash-verified

61 * @brief Standard PBKDF2-SHA256 derivation against a known salt and iteration count.
62 */
63static QByteArray derivePbkdf2(const QByteArray& password, const QByteArray& salt, int iterations)
64{
65 return QPasswordDigestor::deriveKeyPbkdf2(
66 QCryptographicHash::Sha256, password, salt, iterations, kKeyLen);
67}
68
69/**
70 * @brief Hashes @p plain with PBKDF2-SHA256 and returns a PHC-style `pbkdf2-sha256$iter$salt$hash`.

Callers 2

hashPasswordMethod · 0.85
verifyPasswordMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected