aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-crypto.h
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-12-12 07:07:01 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-12-12 07:07:01 +0800
commit6f20275b96e58ece5cf300bd382ba47d04398bd0 (patch)
treee5b8a648f32ea1e62f55d99b1d4c45a74707db4d /mail/mail-crypto.h
parent26eee7328031f78b063ab71265ef4fddc8619c72 (diff)
downloadgsoc2013-evolution-6f20275b96e58ece5cf300bd382ba47d04398bd0.tar.gz
gsoc2013-evolution-6f20275b96e58ece5cf300bd382ba47d04398bd0.tar.zst
gsoc2013-evolution-6f20275b96e58ece5cf300bd382ba47d04398bd0.zip
Updated to reflect arguments to the openpgp functions - now also takes an
2000-12-11 Jeffrey Stedfast <fejj@helixcode.com> * 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
Diffstat (limited to 'mail/mail-crypto.h')
-rw-r--r--mail/mail-crypto.h11
1 files changed, 11 insertions, 0 deletions
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