! * \brief Generates a random salt of length 16. * \return A QByteArray of length 16 containing the generated salt. */
| 39 | * \return A QByteArray of length 16 containing the generated salt. |
| 40 | */ |
| 41 | QByteArray 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. |
no outgoing calls
no test coverage detected