2019-03-18 07:10:58 +00:00
|
|
|
#ifndef PASS_H
|
|
|
|
#define PASS_H
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
2019-03-21 10:22:12 +00:00
|
|
|
class Gpg : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2019-03-18 07:10:58 +00:00
|
|
|
|
2019-03-21 10:22:12 +00:00
|
|
|
public:
|
|
|
|
Gpg();
|
2019-03-21 23:11:36 +00:00
|
|
|
~Gpg() override = default;
|
2019-03-18 07:10:58 +00:00
|
|
|
|
2019-03-21 23:11:36 +00:00
|
|
|
Q_INVOKABLE void listDir();
|
|
|
|
Q_INVOKABLE QString getKeyId(QString uid);
|
|
|
|
Q_INVOKABLE QStringList getAllKeysId();
|
|
|
|
Q_INVOKABLE bool importKey(QString path);
|
2019-03-21 10:22:12 +00:00
|
|
|
Q_INVOKABLE QString decrypt(QByteArray plainText);
|
2019-03-21 23:11:36 +00:00
|
|
|
Q_INVOKABLE QString decryptFile(QString path);
|
2019-03-21 10:22:12 +00:00
|
|
|
Q_INVOKABLE QByteArray encrypt(QString str);
|
2019-03-21 23:11:36 +00:00
|
|
|
Q_INVOKABLE bool encryptFile(QString str, QString path);
|
2019-03-18 07:10:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|