mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-21 20:49:00 -04:00
New Diceware passphrase generator, close #21
This commit is contained in:
parent
93dcf8231f
commit
d9ccde94c9
13 changed files with 11662 additions and 424 deletions
|
@ -23,24 +23,32 @@
|
|||
#include <QLabel>
|
||||
|
||||
#include "core/PasswordGenerator.h"
|
||||
#include "core/PassphraseGenerator.h"
|
||||
|
||||
namespace Ui {
|
||||
class PasswordGeneratorWidget;
|
||||
}
|
||||
|
||||
class PasswordGenerator;
|
||||
class PassphraseGenerator;
|
||||
|
||||
class PasswordGeneratorWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum GeneratorTypes
|
||||
{
|
||||
Password = 0,
|
||||
Diceware = 1
|
||||
};
|
||||
explicit PasswordGeneratorWidget(QWidget* parent = nullptr);
|
||||
~PasswordGeneratorWidget();
|
||||
void loadSettings();
|
||||
void saveSettings();
|
||||
void reset();
|
||||
void setStandaloneMode(bool standalone);
|
||||
public Q_SLOTS:
|
||||
void regeneratePassword();
|
||||
|
||||
signals:
|
||||
|
@ -49,13 +57,14 @@ signals:
|
|||
|
||||
private slots:
|
||||
void applyPassword();
|
||||
void generatePassword();
|
||||
void updateApplyEnabled(const QString& password);
|
||||
void updatePasswordStrength(const QString& password);
|
||||
void togglePasswordShown(bool hidden);
|
||||
|
||||
void sliderMoved();
|
||||
void spinBoxChanged();
|
||||
void passwordSliderMoved();
|
||||
void passwordSpinBoxChanged();
|
||||
void dicewareSliderMoved();
|
||||
void dicewareSpinBoxChanged();
|
||||
void colorStrengthIndicator(double entropy);
|
||||
|
||||
void updateGenerator();
|
||||
|
@ -66,7 +75,8 @@ private:
|
|||
PasswordGenerator::CharClasses charClasses();
|
||||
PasswordGenerator::GeneratorFlags generatorFlags();
|
||||
|
||||
const QScopedPointer<PasswordGenerator> m_generator;
|
||||
const QScopedPointer<PasswordGenerator> m_passwordGenerator;
|
||||
const QScopedPointer<PassphraseGenerator> m_dicewareGenerator;
|
||||
const QScopedPointer<Ui::PasswordGeneratorWidget> m_ui;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue