diff options
Diffstat (limited to 'include/gpg/GpgContext.h')
-rw-r--r-- | include/gpg/GpgContext.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/gpg/GpgContext.h b/include/gpg/GpgContext.h index 81ff3152..e8ae9feb 100644 --- a/include/gpg/GpgContext.h +++ b/include/gpg/GpgContext.h @@ -31,7 +31,7 @@ #include "GpgGenKeyInfo.h" #include "GpgKey.h" -typedef QLinkedList<GpgKey> GpgKeyList; +using GpgKeyList = QLinkedList<GpgKey>; class GpgImportedKey { public: @@ -82,15 +82,17 @@ namespace GpgME { public: GpgContext(); // Constructor + ~GpgContext() override; // Destructor + GpgImportInformation importKey(QByteArray inBuffer); + const GpgKeyList &getKeys() const; + bool exportKeys(QStringList *uidList, QByteArray *outBuffer); bool generateKey(GenKeyInfo *params); - GpgKeyList listKeys(); - void deleteKeys(QStringList *uidList); bool encrypt(QStringList *uidList, const QByteArray &inBuffer, @@ -104,9 +106,10 @@ namespace GpgME { void getKeyDetails(const QString &uid, GpgKey& key); + void signKey(const QVector<GpgKey> &signer, const GpgKey &target, const QString& uid); + gpgme_signature_t verify(QByteArray *inBuffer, QByteArray *sigBuffer = nullptr); -// void decryptVerify(QByteArray in); bool sign(QStringList *uidList, const QByteArray &inBuffer, QByteArray *outBuffer, bool detached = false); /** @@ -158,6 +161,8 @@ namespace GpgME { [[maybe_unused]] bool debug; GpgKeyList mKeyList; + void fetch_keys(); + static void checkErr(gpgme_error_t gpgmeError); static void checkErr(gpgme_error_t gpgmeError, const QString &comment); |