comparison mcabber/src/pgp.h @ 1041:d4b97a2423eb

Introduce PGP utility functions
author Mikael Berthe <mikael@lilotux.net>
date Sun, 26 Nov 2006 10:30:52 +0100
parents
children f89844a0448a
comparison
equal deleted inserted replaced
1040:b6c6734a781b 1041:d4b97a2423eb
1 #ifndef __PGP_H__
2 #define __PGP_H__ 1
3
4 #include <config.h>
5
6 #ifdef HAVE_GPGME
7
8 #define GPGME_ERR_SOURCE_DEFAULT GPG_ERR_SOURCE_USER_1
9 #include <gpgme.h>
10
11 int gpg_init(const char *priv_key, const char *passphrase);
12 void gpg_terminate(void);
13 void gpg_set_passphrase(const char *passphrase);
14 void gpg_set_private_key(const char *priv_keyid);
15 char *gpg_verify(const char *gpg_data, const char *text,
16 gpgme_sigsum_t *sigsum);
17 char *gpg_sign(const char *gpg_data);
18 char *gpg_decrypt(const char *gpg_data);
19 char *gpg_encrypt(const char *gpg_data, const char *keyid);
20
21 int gpg_test_passphrase(void);
22
23 #endif /* HAVE_GPGME */
24
25 inline int gpg_enabled(void);
26
27 #endif /* __PGP_H__ */
28
29 /* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */