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

Function randomSalt

app/src/Misc/PasswordHash.cpp:53–58  ·  view source on GitHub ↗

* @brief Generates kSaltLen bytes of cryptographically strong randomness. */

Source from the content-addressed store, hash-verified

51 * @brief Generates kSaltLen bytes of cryptographically strong randomness.
52 */
53static QByteArray randomSalt()
54{
55 QByteArray salt(kSaltLen, Qt::Uninitialized);
56 QRandomGenerator::system()->generate(salt.begin(), salt.end());
57 return salt;
58}
59
60/**
61 * @brief Standard PBKDF2-SHA256 derivation against a known salt and iteration count.

Callers 1

hashPasswordMethod · 0.85

Calls 2

beginMethod · 0.80
generateMethod · 0.45

Tested by

no test coverage detected