18 #ifndef CUTELYSTPLUGIN_CREDENTIALPASSWORD_H
19 #define CUTELYSTPLUGIN_CREDENTIALPASSWORD_H
21 #include <QtCore/QCryptographicHash>
23 #include <Cutelyst/cutelyst_global.h>
24 #include <Cutelyst/Plugins/Authentication/authentication.h>
28 class CredentialPasswordPrivate;
57 void setPasswordField(
const QString &fieldName);
62 PasswordType passwordType()
const;
67 void setPasswordType(PasswordType type);
72 QString passwordPreSalt()
const;
77 void setPasswordPreSalt(
const QString &passwordPreSalt);
82 QString passwordPostSalt()
const;
87 void setPasswordPostSalt(
const QString &passwordPostSalt);
104 static QByteArray createPassword(
const QByteArray &password, QCryptographicHash::Algorithm method,
int iterations,
int saltByteSize,
int hashByteSize);
131 static QByteArray pbkdf2(QCryptographicHash::Algorithm method,
133 int rounds,
int keyLength);
141 CredentialPasswordPrivate *d_ptr;
151 #endif // CUTELYSTPLUGIN_CREDENTIALPASSWORD_H
static QByteArray createPassword(const QByteArray &password, QCryptographicHash::Algorithm method, int iterations, int saltByteSize, int hashByteSize)
Creates a password hash string.
QByteArray toUtf8() const