1 #ifndef __MCABBER_PGP_H__ 2 #define __MCABBER_PGP_H__ 1 3 4 #include <mcabber/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 int gpg_is_version1(void); 13 void gpg_terminate(void); 14 void gpg_set_passphrase(const char *passphrase); 15 void gpg_set_private_key(const char *priv_keyid); 16 const char *gpg_get_private_key_id(void); 17 char *gpg_verify(const char *gpg_data, const char *text, 18 gpgme_sigsum_t *sigsum); 19 char *gpg_sign(const char *gpg_data); 20 char *gpg_decrypt(const char *gpg_data); 21 char *gpg_encrypt(const char *gpg_data, const char *keyid[], size_t n); 22 23 int gpg_test_passphrase(void); 24 25 #endif /* HAVE_GPGME */ 26 27 int gpg_enabled(void); 28 29 #endif /* __MCABBER_PGP_H__ */ 30 31 /* vim: set et cindent cinoptions=>2\:2(0 ts=2 sw=2: For Vim users... */ 32