13class EnterApiPwDialog;
32 const std::string& nonce,
33 const std::string& tag,
34 QWidget* parent =
nullptr);
61 Ui::EnterApiPwDialog*
ui;
std::string getApiKey() const
Returns the decrypted API key, if encryption was successful. Else: Returns an empty string.
Definition enterapipwdialog.cpp:21
std::string cipher_
Cypher text of the API key.
Definition enterapipwdialog.h:63
bool success_
True if decryption was successful, else false.
Definition enterapipwdialog.h:71
EnterApiPwDialog(const std::string &cipher, const std::string &nonce, const std::string &tag, QWidget *parent=nullptr)
Initializes the dialog with data needed for decryption.
Definition enterapipwdialog.cpp:6
void on_buttonBox_rejected()
Closes the dialog.
Definition enterapipwdialog.cpp:52
void on_buttonBox_accepted()
Tries to decrypt the API key with the entered password. On success: Closes the dialog....
Definition enterapipwdialog.cpp:31
std::string api_key_
The decrypted API key, if decryption was successful.
Definition enterapipwdialog.h:69
Ui::EnterApiPwDialog * ui
Contains auto-generated UI elements.
Definition enterapipwdialog.h:61
std::string nonce_
AES-GCM nonce used during encryption.
Definition enterapipwdialog.h:65
bool dialog_completed_
Indicates whether the dialog has been completed.
Definition enterapipwdialog.h:73
std::string tag_
AES-GCM authorization tag generated during encryption.
Definition enterapipwdialog.h:67
~EnterApiPwDialog()
Deletes the UI.
Definition enterapipwdialog.cpp:16
bool wasSuccessful() const
Indicates whether decryption was successful.
Definition enterapipwdialog.cpp:26