New Diceware passphrase generator, close #21

This commit is contained in:
thez3ro 2017-03-04 15:10:50 +01:00
parent 93dcf8231f
commit d9ccde94c9
No known key found for this signature in database
GPG key ID: F628F9E41DD7C073
13 changed files with 11662 additions and 424 deletions

View file

@ -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;
};