12class ChangeApiPwDialog;
31 const std::string& cipher =
"",
32 const std::string& nonce =
"",
33 const std::string& tag =
"",
34 QWidget* parent =
nullptr);
40 Ui::ChangeApiPwDialog*
ui;
void keyEncryptionUpdated(std::string cipher, std::string nonce, std::string tag, bool default_pw)
Signals that the NexusMods api key is to be encrypted with a new password.
ChangeApiPwDialog(bool uses_default_pw, const std::string &cipher="", const std::string &nonce="", const std::string &tag="", QWidget *parent=nullptr)
Initializes the dialog with data needed for decryption.
Definition changeapipwdialog.cpp:9
std::string nonce_
AES-GCM nonce used during encryption.
Definition changeapipwdialog.h:44
void on_button_box_accepted()
Tries to decrypt the API key with the old password. If that fails: Shows an error....
Definition changeapipwdialog.cpp:42
void onPasswordValidityChanged(bool is_valid)
Disables/ enables the OK button, depending on if the entered passwords match.
Definition changeapipwdialog.cpp:37
std::string tag_
AES-GCM authorization tag generated during encryption.
Definition changeapipwdialog.h:46
Ui::ChangeApiPwDialog * ui
Contains auto-generated UI elements.
Definition changeapipwdialog.h:40
std::string cipher_
Cypher text of the API key.
Definition changeapipwdialog.h:42
void on_button_box_rejected()
Closes the dialog.
Definition changeapipwdialog.cpp:89
~ChangeApiPwDialog()
Deletes the UI.
Definition changeapipwdialog.cpp:32
bool dialog_completed_
Indicates whether the dialog has been completed.
Definition changeapipwdialog.h:48
bool uses_default_pw_
If true: Key is encrypted using cryptography::default_key.
Definition changeapipwdialog.h:50