# GpgFrontend Project: src/core/function/gpg/GpgBasicOperator.h Source File

GpgBasicOperator.h
#ifndef GPGFRONTEND_ZH_CN_TS_BASICOPERATOR_H
#define GPGFRONTEND_ZH_CN_TS_BASICOPERATOR_H
#include "core/GpgConstants.h"
#include "core/GpgContext.h"
#include "core/GpgFunctionObject.h"
#include "core/GpgModel.h"
namespace GpgFrontend {
class GPGFRONTEND_CORE_EXPORT GpgBasicOperator
: public SingletonFunctionObject<GpgBasicOperator> {
public:
explicit GpgBasicOperator(
int channel = SingletonFunctionObject::GetDefaultChannel());
gpg_error_t Encrypt(KeyListPtr keys, BypeArrayRef in_buffer,
ByteArrayPtr& out_buffer, GpgEncrResult& result);
gpg_error_t EncryptSymmetric(BypeArrayRef in_buffer, ByteArrayPtr& out_buffer,
GpgEncrResult& result);
gpgme_error_t EncryptSign(KeyListPtr keys, KeyListPtr signers,
BypeArrayRef in_buffer, ByteArrayPtr& out_buffer,
GpgEncrResult& encr_result,
GpgSignResult& sign_result);
gpgme_error_t Decrypt(BypeArrayRef in_buffer, ByteArrayPtr& out_buffer,
GpgDecrResult& result);
gpgme_error_t DecryptVerify(BypeArrayRef in_buffer, ByteArrayPtr& out_buffer,
GpgDecrResult& decrypt_result,
GpgVerifyResult& verify_result);
gpgme_error_t Verify(BypeArrayRef in_buffer, ByteArrayPtr& sig_buffer,
GpgVerifyResult& result) const;
gpg_error_t Sign(KeyListPtr signers, BypeArrayRef in_buffer,
ByteArrayPtr& out_buffer, gpgme_sig_mode_t mode,
GpgSignResult& result);
void SetSigners(KeyArgsList& signers);
std::unique_ptr<KeyArgsList> GetSigners();
private:
GpgContext& ctx_ = GpgContext::GetInstance(
SingletonFunctionObject::GetChannel());
};
} // namespace GpgFrontend
#endif // GPGFRONTEND_ZH_CN_TS_BASICOPERATOR_H
GpgFrontend::GpgBasicOperator
Basic operation collection.
Definition: GpgBasicOperator.h:44
GpgFrontend::GpgContext
Definition: GpgContext.h:64
GpgFrontend::SingletonFunctionObject
Definition: GpgFunctionObject.h:150
GpgFrontend::SingletonFunctionObject::GetDefaultChannel
static int GetDefaultChannel()
Get the Default Channel object.
Definition: GpgFunctionObject.h:251
GpgFrontend::SingletonFunctionObject< GpgContext >::GetInstance
static GpgContext & GetInstance(int channel=GpgFrontend::GPGFRONTEND_DEFAULT_CHANNEL)
Get the Instance object.
Definition: GpgFunctionObject.h:172
GpgFrontend::SingletonFunctionObject::GetChannel
int GetChannel() const
Get the Channel object.
Definition: GpgFunctionObject.h:258
GpgFrontend
Definition: CoreCommonUtil.cpp:31