diff options
author | Saturn&Eric <[email protected]> | 2022-01-05 20:02:19 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2022-01-05 20:02:19 +0000 |
commit | a3ca1bf1d4404327d68d3d49127085638c272152 (patch) | |
tree | deb10c33977e5002fa6e9b434f2b07d2719a4e31 /src/gpg/function/GpgFileOpera.h | |
parent | Merge pull request #37 from saturneric/document (diff) | |
parent | <doc>(navbar): take repository and GitHub apart. (diff) | |
download | GpgFrontend-a3ca1bf1d4404327d68d3d49127085638c272152.tar.gz GpgFrontend-a3ca1bf1d4404327d68d3d49127085638c272152.zip |
Merge pull request #36 from saturneric/developv2.0.4
v2.0.4
Diffstat (limited to 'src/gpg/function/GpgFileOpera.h')
-rw-r--r-- | src/gpg/function/GpgFileOpera.h | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/src/gpg/function/GpgFileOpera.h b/src/gpg/function/GpgFileOpera.h index 4aaf09f1..f4508f42 100644 --- a/src/gpg/function/GpgFileOpera.h +++ b/src/gpg/function/GpgFileOpera.h @@ -33,22 +33,41 @@ namespace GpgFrontend { class GpgFileOpera : public SingletonFunctionObject<GpgFileOpera> { public: - static GpgError EncryptFile(KeyListPtr keys, const std::string& path, - GpgEncrResult& result); + explicit GpgFileOpera( + int channel = SingletonFunctionObject::GetDefaultChannel()) + : SingletonFunctionObject<GpgFileOpera>(channel) {} - static GpgError DecryptFile(const std::string& path, GpgDecrResult& result); + static unsigned int EncryptFile(KeyListPtr keys, const std::string& in_path, + const std::string& out_path, + GpgEncrResult& result, + int _channel = GPGFRONTEND_DEFAULT_CHANNEL); - static GpgError SignFile(KeyListPtr keys, const std::string& path, - GpgSignResult& result); + static unsigned int EncryptFileSymmetric( + const std::string& in_path, const std::string& out_path, + GpgEncrResult& result, int _channel = GPGFRONTEND_DEFAULT_CHANNEL); - static GpgError VerifyFile(const std::string& path, GpgVerifyResult& result); + static GpgError DecryptFile(const std::string& in_path, + const std::string& out_path, + GpgDecrResult& result); + + static GpgError SignFile(KeyListPtr keys, const std::string& in_path, + const std::string& out_path, GpgSignResult& result, + int _channel = GPGFRONTEND_DEFAULT_CHANNEL); + + static GpgError VerifyFile(const std::string& data_path, + const std::string& sign_path, + GpgVerifyResult& result, + int _channel = GPGFRONTEND_DEFAULT_CHANNEL); static GpgError EncryptSignFile(KeyListPtr keys, KeyListPtr signer_keys, - const std::string& path, + const std::string& in_path, + const std::string& out_path, GpgEncrResult& encr_res, - GpgSignResult& sign_res); + GpgSignResult& sign_res, + int _channel = GPGFRONTEND_DEFAULT_CHANNEL); - static GpgError DecryptVerifyFile(const std::string& path, + static GpgError DecryptVerifyFile(const std::string& in_path, + const std::string& out_path, GpgDecrResult& decr_res, GpgVerifyResult& verify_res); }; |