pgLab/pglab/PasswordPromptDialog.h
eelke e36924c087 Passwords are now saved in a password manager.
The password manager uses strong encryption using a key derived from the passphrase using
scrypt key strengthening algorithm. This ensures encryption is performed using a strong key
and that brute forcing the passphrase is time consuming.

If the user loses his passphrase no recovery is possible.
2018-11-08 21:50:49 +01:00

44 lines
904 B
C++

#ifndef PASSWORDPROMPTDIALOG_H
#define PASSWORDPROMPTDIALOG_H
#include <QDialog>
class QCheckBox;
class QDialogButtonBox;
class QLabel;
class QLineEdit;
class PasswordPromptDialog : public QDialog
{
Q_OBJECT
public:
enum Flag {
ConfirmPassword = 1,
SaveOption = 2
};
Q_DECLARE_FLAGS(Flags, Flag)
//Q_FLAG(Flags)
explicit PasswordPromptDialog(Flags flags, QWidget *parent = nullptr);
void setDescription(const QString &description);
QString password() const;
bool saveChecked() const;
private:
Flags m_Flags;
QLabel *m_connectionLabel = nullptr;
QLabel *m_passwordLabel[2] = { nullptr, nullptr };
QLineEdit *m_passwordInput[2] = { nullptr, nullptr };
QCheckBox *m_saveCheck = nullptr;
QDialogButtonBox *m_DialogButtons = nullptr;
void retranslateUi();
void updateOkEnabled();
private slots:
void passwordChanged(const QString &text);
};
#endif // PASSWORDPROMPTDIALOG_H