1
0
mirror of https://github.com/QRouland/UTPass.git synced 2026-01-10 19:36:57 +00:00

Rewrite import key with rnp

This commit is contained in:
2025-01-29 16:42:37 +01:00
parent c01fae0c58
commit 2c9d82e0b1
30 changed files with 654 additions and 719 deletions

View File

@@ -0,0 +1,47 @@
#ifndef DECRYPTJOB_H
#define DECRYPTJOB_H
#include <QThread>
#include <QDir>
/**
* @class DecryptJob
* @brief A class to handle decrypt a file in a separate thread.
*
*/
class DecryptJob : public QThread
{
Q_OBJECT
/**
* @brief The main function that performs the decrypt operation.
*
* Handles the process of removing recursively a target path.
*/
void run() override;
signals:
/**
* @brief Signal emitted when the decrypt operation is complete.
*
* @param err A boolean indicating whether an error occurred during removing.
* `true` if an error occurred, `false` if the clone was successful.
*/
void resultReady(const bool err);
private:
QString m_encryped_file_path; ///< The path of the encrypted file.
QString m_keyfile_path; ///< The path of the key file.
public:
/**
* @brief Constructor for the RmJob class.
*
* Initializes the DecryptJob with the specified file to decrypt.
*
* @param path Path of the file to decrypt.
*/
DecryptJob(QString path);
};
#endif // DECRYPTJO_H