GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
GpgFileOpera.h
1 
29 #ifndef GPGFRONTEND_GPGFILEOPERA_H
30 #define GPGFRONTEND_GPGFILEOPERA_H
31 
32 #include "core/GpgConstants.h"
33 #include "core/GpgContext.h"
34 #include "core/GpgModel.h"
35 
36 namespace GpgFrontend {
37 
43 class GPGFRONTEND_CORE_EXPORT GpgFileOpera
44  : public SingletonFunctionObject<GpgFileOpera> {
45  public:
46  explicit GpgFileOpera(
48 
59  static unsigned int EncryptFile(KeyListPtr keys, const std::string& in_path,
60  const std::string& out_path,
61  GpgEncrResult& result,
62  int _channel = GPGFRONTEND_DEFAULT_CHANNEL);
63 
73  static unsigned int EncryptFileSymmetric(
74  const std::string& in_path, const std::string& out_path,
75  GpgEncrResult& result, int _channel = GPGFRONTEND_DEFAULT_CHANNEL);
76 
85  static GpgError DecryptFile(const std::string& in_path,
86  const std::string& out_path,
87  GpgDecrResult& result);
88 
99  static GpgError SignFile(KeyListPtr keys, const std::string& in_path,
100  const std::string& out_path, GpgSignResult& result,
101  int _channel = GPGFRONTEND_DEFAULT_CHANNEL);
102 
112  static GpgError VerifyFile(const std::string& data_path,
113  const std::string& sign_path,
114  GpgVerifyResult& result,
115  int _channel = GPGFRONTEND_DEFAULT_CHANNEL);
116 
129  static GpgError EncryptSignFile(KeyListPtr keys, KeyListPtr signer_keys,
130  const std::string& in_path,
131  const std::string& out_path,
132  GpgEncrResult& encr_res,
133  GpgSignResult& sign_res,
134  int _channel = GPGFRONTEND_DEFAULT_CHANNEL);
135 
145  static GpgError DecryptVerifyFile(const std::string& in_path,
146  const std::string& out_path,
147  GpgDecrResult& decr_res,
148  GpgVerifyResult& verify_res);
149 };
150 
151 } // namespace GpgFrontend
152 
153 #endif // GPGFRONTEND_GPGFILEOPERA_H
Definition: GpgFileOpera.h:44
Definition: GpgFunctionObject.h:150
static int GetDefaultChannel()
Get the Default Channel object.
Definition: GpgFunctionObject.h:251
Definition: CoreCommonUtil.cpp:31