MCPcopy Create free account
hub / github.com/Segs/Segs / generateSalt

Method generateSalt

Components/PasswordHasher.cpp:41–45  ·  view source on GitHub ↗

! * \brief Generates a random salt of length 16. * \return A QByteArray of length 16 containing the generated salt. */

Source from the content-addressed store, hash-verified

39 * \return A QByteArray of length 16 containing the generated salt.
40 */
41QByteArray PasswordHasher::generateSalt()
42{
43 QString salt = getRandomString(16);
44 return salt.toUtf8();
45}
46
47/*!
48 * \brief Hashes a password with the given salt using the Sha256 algorithm.

Callers 2

addAccountMethod · 0.80
addAccountMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected