summaryrefslogtreecommitdiff
path: root/plugins/CryptoPP/src/GPGw/gpg.h
blob: 2c60a5570e753f99427924ffab829afce8952089 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef __GPG_H__
#define __GPG_H__

typedef enum
{
  gpgSuccess,
  gpgUnknownError,
  gpgWriteToFileFailed,
  gpgReadFromFileFailed,
  gpgExecuteFailed
}
gpgResult;

// konstanten fuer die initialisierung der parameter
extern char *txtgpgargslistpublickeys;
extern char *txtgpgargslistsecretkeys;
extern char *txtgpgargsimportpublickey;
extern char *txtgpgargsexportpublickey;
extern char *txtgpgargsdetectuserid;
extern char *txtgpgargsencrypt;
extern char *txtgpgargsdecrypt;

// sonstige konstanten
extern char *txtcrlf;
extern char *txtidseparator;

// zeichenketten
extern char gpgExecutable[];
extern char gpgHomeDirectory[];

// funktionsprototypen
gpgResult gpgListPublicKeys(char *aresult);
gpgResult gpgListSecretKeys(char *aresult);
gpgResult gpgImportPublicKey(const char *akey);
gpgResult gpgExportPublicKey(char *aresult, const char *auserid);
gpgResult gpgDetectUserID(char *aresult, const char *aciphertext);
gpgResult gpgEncrypt(char *aresult, const char *auserid, const char *aplaintext);
gpgResult gpgDecrypt(char *aresult, const char *aciphertext, const char *apassphrase);

#endif // __GPG_H__