GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
|
29 #ifndef GPGFRONTEND_ZH_CN_TS_BASICOPERATOR_H
30 #define GPGFRONTEND_ZH_CN_TS_BASICOPERATOR_H
32 #include "core/GpgConstants.h"
33 #include "core/GpgContext.h"
34 #include "core/GpgFunctionObject.h"
35 #include "core/GpgModel.h"
66 gpg_error_t Encrypt(KeyListPtr keys, BypeArrayRef in_buffer,
67 ByteArrayPtr& out_buffer, GpgEncrResult& result);
77 gpg_error_t EncryptSymmetric(BypeArrayRef in_buffer, ByteArrayPtr& out_buffer,
78 GpgEncrResult& result);
93 gpgme_error_t EncryptSign(KeyListPtr keys, KeyListPtr signers,
94 BypeArrayRef in_buffer, ByteArrayPtr& out_buffer,
95 GpgEncrResult& encr_result,
96 GpgSignResult& sign_result);
106 gpgme_error_t Decrypt(BypeArrayRef in_buffer, ByteArrayPtr& out_buffer,
107 GpgDecrResult& result);
119 gpgme_error_t DecryptVerify(BypeArrayRef in_buffer, ByteArrayPtr& out_buffer,
120 GpgDecrResult& decrypt_result,
121 GpgVerifyResult& verify_result);
131 gpgme_error_t Verify(BypeArrayRef in_buffer, ByteArrayPtr& sig_buffer,
132 GpgVerifyResult& result)
const;
154 gpg_error_t Sign(KeyListPtr signers, BypeArrayRef in_buffer,
155 ByteArrayPtr& out_buffer, gpgme_sig_mode_t mode,
156 GpgSignResult& result);
164 void SetSigners(KeyArgsList& signers);
171 std::unique_ptr<KeyArgsList> GetSigners();
179 #endif // GPGFRONTEND_ZH_CN_TS_BASICOPERATOR_H
Basic operation collection.
Definition: GpgBasicOperator.h:43
Definition: GpgFunctionObject.h:159
gpgme_error_t Decrypt(BypeArrayRef in_buffer, ByteArrayPtr &out_buffer, GpgDecrResult &result)
Call the interface provided by gpgme for decryption operation.
Definition: GpgBasicOperator.cpp:64
Definition: CoreCommonUtil.cpp:29
static GpgContext & GetInstance(int channel=GpgFrontend::GPGFRONTEND_DEFAULT_CHANNEL)
Get the Instance object.
Definition: GpgFunctionObject.h:181
gpgme_error_t DecryptVerify(BypeArrayRef in_buffer, ByteArrayPtr &out_buffer, GpgDecrResult &decrypt_result, GpgVerifyResult &verify_result)
Call the interface provided by gpgme to perform decryption and verification operations at the same ti...
Definition: GpgBasicOperator.cpp:123
GPGFRONTEND_CORE_EXPORT GpgError check_gpg_error(GpgError err)
Definition: GpgConstants.cpp:57
int GetChannel() const
Get the Channel object.
Definition: GpgFunctionObject.h:252
std::unique_ptr< KeyArgsList > GetSigners()
Get a global signature private keys that has been set.
Definition: GpgBasicOperator.cpp:193
gpgme_error_t Verify(BypeArrayRef in_buffer, ByteArrayPtr &sig_buffer, GpgVerifyResult &result) const
Call the interface provided by gpgme for verification operation.
Definition: GpgBasicOperator.cpp:81
gpg_error_t Sign(KeyListPtr signers, BypeArrayRef in_buffer, ByteArrayPtr &out_buffer, gpgme_sig_mode_t mode, GpgSignResult &result)
Call the interface provided by gpgme for signing operation.
Definition: GpgBasicOperator.cpp:101
void SetSigners(KeyArgsList &signers)
Set the private key for signatures, this operation is a global operation.
Definition: GpgBasicOperator.cpp:178
Definition: GpgContext.h:59
GpgBasicOperator(int channel=SingletonFunctionObject::GetDefaultChannel())
Construct a new Basic Operator object.
Definition: GpgBasicOperator.cpp:35
gpg_error_t EncryptSymmetric(BypeArrayRef in_buffer, ByteArrayPtr &out_buffer, GpgEncrResult &result)
Call the interface provided by GPGME to symmetrical encryption.
Definition: GpgBasicOperator.cpp:203
gpgme_error_t EncryptSign(KeyListPtr keys, KeyListPtr signers, BypeArrayRef in_buffer, ByteArrayPtr &out_buffer, GpgEncrResult &encr_result, GpgSignResult &sign_result)
Call the interface provided by gpgme to perform encryption and signature operations at the same time.
Definition: GpgBasicOperator.cpp:144
static int GetDefaultChannel()
Get the Default Channel object.
Definition: GpgFunctionObject.h:245
ByteArrayPtr Read2Buffer()
Definition: GpgData.cpp:55
gpg_error_t Encrypt(KeyListPtr keys, BypeArrayRef in_buffer, ByteArrayPtr &out_buffer, GpgEncrResult &result)
Call the interface provided by gpgme for encryption operation.
Definition: GpgBasicOperator.cpp:38
GPGFRONTEND_CORE_EXPORT GpgEncrResult _new_result(gpgme_encrypt_result_t &&result)
Definition: GpgConstants.cpp:170