Dialog used for changing the current password used to encrypt the NexusMods API key.
More...
#include <changeapipwdialog.h>
|
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.
|
|
| ~ChangeApiPwDialog () |
| Deletes the UI.
|
|
|
void | onPasswordValidityChanged (bool is_valid) |
| Disables/ enables the OK button, depending on if the entered passwords match.
|
|
void | on_button_box_accepted () |
| Tries to decrypt the API key with the old password. If that fails: Shows an error. On success: Encrypts the key with the new password and closes the dialog.
|
|
void | on_button_box_rejected () |
| Closes the dialog.
|
|
|
Ui::ChangeApiPwDialog * | ui |
| Contains auto-generated UI elements.
|
|
std::string | cipher_ |
| Cypher text of the API key.
|
|
std::string | nonce_ |
| AES-GCM nonce used during encryption.
|
|
std::string | tag_ |
| AES-GCM authorization tag generated during encryption.
|
|
bool | dialog_completed_ = false |
| Indicates whether the dialog has been completed.
|
|
bool | uses_default_pw_ |
| If true: Key is encrypted using cryptography::default_key.
|
|
Dialog used for changing the current password used to encrypt the NexusMods API key.
◆ ChangeApiPwDialog()
ChangeApiPwDialog::ChangeApiPwDialog |
( |
bool | uses_default_pw, |
|
|
const std::string & | cipher = "", |
|
|
const std::string & | nonce = "", |
|
|
const std::string & | tag = "", |
|
|
QWidget * | parent = nullptr ) |
|
explicit |
Initializes the dialog with data needed for decryption.
- Parameters
-
cipher | Cypher text of the API key. |
nonce | AES-GCM nonce used during encryption. |
tag | AES-GCM authorization tag generated during encryption. |
parent | Parent for this widget, this is passed to the constructor of QDialog. |
◆ keyEncryptionUpdated
void ChangeApiPwDialog::keyEncryptionUpdated |
( |
std::string | cipher, |
|
|
std::string | nonce, |
|
|
std::string | tag, |
|
|
bool | default_pw ) |
|
signal |
Signals that the NexusMods api key is to be encrypted with a new password.
- Parameters
-
cipher | Cypher text of the API key. |
nonce | AES-GCM nonce used during encryption. |
tag | AES-GCM authorization tag generated during encryption. |
uses_default_pw | If true: User set no password. |
◆ onPasswordValidityChanged
void ChangeApiPwDialog::onPasswordValidityChanged |
( |
bool | is_valid | ) |
|
|
privateslot |
Disables/ enables the OK button, depending on if the entered passwords match.
- Parameters
-
is_valid | True if both passwords match. |
The documentation for this class was generated from the following files: