|
QtPass 2.0.0
Developer documentation
|
Implements KeygenDialog: form validation, splicing the passphrase into the GPG batch the way gpg itself reads it, and the one-attempt connections to the Pass backend. More...
#include "keygendialog.h"#include "configdialog.h"#include "pass.h"#include "qprogressindicator.h"#include "qtpasssettings.h"#include "ui_keygendialog.h"#include "windowstatestore.h"#include <QCheckBox>#include <QMessageBox>#include <QRegularExpression>#include <algorithm>#include "qtpasslogging.h"Go to the source code of this file.
Functions | |
| static QStringList | batchLines (QString batch) |
| Cut a batch template into its non-empty lines at CR and LF. | |
| static bool | isControlStatement (const QString &line, const QString &control) |
Whether a batch line is the control statement control. | |
Implements KeygenDialog: form validation, splicing the passphrase into the GPG batch the way gpg itself reads it, and the one-attempt connections to the Pass backend.
Definition in file keygendialog.cpp.
|
static |
Cut a batch template into its non-empty lines at CR and LF.
Plain character splitting, no regex: QRegularExpression matches nothing in text that is not valid UTF-16, so a lone surrogate anywhere left the whole batch one "line" and no-protection was never found.
| batch | The template text. |
Definition at line 99 of file keygendialog.cpp.
|
static |
Whether a batch line is the control statement control.
Matches the way gpg's read_parameter_file does: leading whitespace skipped, keyword ends at the first whitespace, case-insensitive.
| line | One line of the batch template. |
| control | The statement to look for, e.g. no-protection. |
Definition at line 130 of file keygendialog.cpp.