5 #ifndef CUTELYSTPLUGIN_CREDENTIALPASSWORD_H 6 #define CUTELYSTPLUGIN_CREDENTIALPASSWORD_H 8 #include <Cutelyst/Plugins/Authentication/authentication.h> 9 #include <Cutelyst/cutelyst_global.h> 11 #include <QtCore/QCryptographicHash> 15 class CredentialPasswordPrivate;
45 void setPasswordField(
const QString &fieldName);
50 PasswordType passwordType()
const;
55 void setPasswordType(PasswordType type);
60 QString passwordPreSalt()
const;
65 void setPasswordPreSalt(
const QString &passwordPreSalt);
70 QString passwordPostSalt()
const;
75 void setPasswordPostSalt(
const QString &passwordPostSalt);
85 static bool validatePassword(
const QString &password,
const QString &correctHash);
142 CredentialPasswordPrivate *d_ptr;
158 #endif // CUTELYSTPLUGIN_CREDENTIALPASSWORD_H
static QByteArray createPassword(const QByteArray &password, QCryptographicHash::Algorithm method, int iterations, int saltByteSize, int hashByteSize)
Creates a password hash string.
The Cutelyst namespace holds all public Cutelyst API.
QByteArray toLatin1() const const
QString fromLatin1(const char *str, int size)
static bool validatePassword(const QByteArray &password, const QByteArray &correctHash)
Validates the given password against the correct hash.
QByteArray toUtf8() const const