From 6f20275b96e58ece5cf300bd382ba47d04398bd0 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Mon, 11 Dec 2000 23:07:01 +0000 Subject: Updated to reflect arguments to the openpgp functions - now also takes an 2000-12-11 Jeffrey Stedfast * mail-format.c (decode_pgp): Updated to reflect arguments to the openpgp functions - now also takes an outlen argument. (try_inline_pgp): Updated. (handle_multipart_encrypted): Updated here too. * mail-crypto.c (crypto_exec_with_passwd): Updated to handle binary streams and such. (mail_crypto_openpgp_encrypt): Always initialize the passwd_fds even if we don't plan on signing. Added an 'inlen' to specify the length of the input data (as it could be binary). Also added a 'userid' argument for cases when we want to sign as well as encrypt. (mail_crypto_openpgp_decrypt): Updated to take an outlen argument in case the ciphertext is encrypted binary data. (mail_crypto_openpgp_clearsign): Added a 'hash' and 'detach' arguments. 'hash' allows the program to specify the preferred hash function (which will come in handy when generating PGP/MIME). 'detach' allows the program to specify whether it wants a detached signature or the entire signed text. svn path=/trunk/; revision=6921 --- mail/mail-crypto.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'mail/mail-crypto.h') diff --git a/mail/mail-crypto.h b/mail/mail-crypto.h index 8ea9999809..44d8a00400 100644 --- a/mail/mail-crypto.h +++ b/mail/mail-crypto.h @@ -31,16 +31,27 @@ extern "C" { #pragma } #endif /* __cplusplus }*/ +typedef enum { + PGP_HASH_TYPE_NONE, + PGP_HASH_TYPE_MD5, + PGP_HASH_TYPE_SHA1 +} PgpHashType; + char *mail_crypto_openpgp_decrypt (const char *ciphertext, + int *outlen, CamelException *ex); char *mail_crypto_openpgp_encrypt (const char *plaintext, + int inlen, const GPtrArray *recipients, gboolean sign, + const char *userid, CamelException *ex); char *mail_crypto_openpgp_clearsign (const char *plaintext, const char *userid, + PgpHashType hash, + gboolean detached, CamelException *ex); #ifdef __cplusplus -- cgit v1.2.3