diff options
author | Saturneric <[email protected]> | 2021-06-27 20:00:05 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2021-06-27 20:00:05 +0000 |
commit | 5143c2d56255dec8ca618bc9acaf054781dd8746 (patch) | |
tree | c2861c182fc59bbf5d505bc87929cdd118a5297e /include/gpg/GpgFileOpera.h | |
parent | Develop File Opera Functions (diff) | |
download | GpgFrontend-5143c2d56255dec8ca618bc9acaf054781dd8746.tar.gz GpgFrontend-5143c2d56255dec8ca618bc9acaf054781dd8746.zip |
Add and improve file operation functions.
Diffstat (limited to '')
-rw-r--r-- | include/gpg/GpgFileOpera.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/include/gpg/GpgFileOpera.h b/include/gpg/GpgFileOpera.h index c6b4aec8..9b5e118c 100644 --- a/include/gpg/GpgFileOpera.h +++ b/include/gpg/GpgFileOpera.h @@ -30,7 +30,21 @@ class GpgFileOpera { public: - static bool encryptFile(GpgME::GpgContext *ctx, QVector<GpgKey> &keys, const QString &mPath); + static gpgme_error_t encryptFile(GpgME::GpgContext *ctx, QVector<GpgKey> &keys, const QString &mPath, + gpgme_encrypt_result_t *result); + + static gpgme_error_t decryptFile(GpgME::GpgContext *ctx, const QString &mPath, gpgme_decrypt_result_t *result); + + static gpgme_error_t signFile(GpgME::GpgContext *ctx, QVector<GpgKey> &keys, const QString &mPath, + gpgme_sign_result_t *result); + + static gpgme_error_t verifyFile(GpgME::GpgContext *ctx, const QString &mPath, gpgme_verify_result_t *result); + + static gpg_error_t + encryptSignFile(GpgME::GpgContext *ctx, QVector<GpgKey> &keys, const QString &mPath, gpgme_encrypt_result_t *encr_res, gpgme_sign_result_t *sign_res); + + static gpg_error_t decryptVerifyFile(GpgME::GpgContext *ctx, const QString &mPath, gpgme_decrypt_result_t *decr_res, gpgme_verify_result_t *verify_res); + }; |