GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
GpgData.h
1
29#ifndef _GPGDATA_H
30#define _GPGDATA_H
31
32#include "core/GpgConstants.h"
33
34namespace GpgFrontend {
39class GpgData {
40 public:
45 GpgData();
46
54 GpgData(void* buffer, size_t size, bool copy = true);
55
61 operator gpgme_data_t();
62
68 ByteArrayPtr Read2Buffer();
69
70 private:
76 void operator()(gpgme_data_t _data) {
77 if (_data != nullptr) gpgme_data_release(_data);
78 }
79 };
80
81 std::unique_ptr<struct gpgme_data, _data_ref_deleter> data_ref_ =
82 nullptr;
83};
84
85} // namespace GpgFrontend
86
87#endif // _GPGDATA_H
Definition: GpgData.h:39
GpgData()
Construct a new Gpg Data object.
Definition: GpgData.cpp:31
ByteArrayPtr Read2Buffer()
Definition: GpgData.cpp:55
Definition: CoreCommonUtil.cpp:29