aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-cipher-context.h
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-cipher-context.h')
-rw-r--r--camel/camel-cipher-context.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/camel/camel-cipher-context.h b/camel/camel-cipher-context.h
index 5147cc5ebc..c3a6641967 100644
--- a/camel/camel-cipher-context.h
+++ b/camel/camel-cipher-context.h
@@ -51,6 +51,8 @@ typedef struct _CamelCipherContext {
CamelObject parent_object;
struct _CamelCipherContextPrivate *priv;
+
+ const char *protocol; /* this MUST be set by implementors */
CamelSession *session;
@@ -76,6 +78,9 @@ typedef struct _CamelCipherContextClass {
int (*decrypt) (CamelCipherContext *context, CamelStream *istream, CamelStream *ostream,
CamelException *ex);
+ CamelCipherHash (*id_to_hash)(CamelCipherContext *context, const char *id);
+ const char * (*hash_to_id)(CamelCipherContext *context, CamelCipherHash hash);
+
} CamelCipherContextClass;
CamelType camel_cipher_context_get_type (void);
@@ -102,6 +107,10 @@ int camel_cipher_encrypt (CamelCipherContext *context, gboolean
int camel_cipher_decrypt (CamelCipherContext *context, CamelStream *istream, CamelStream *ostream,
CamelException *ex);
+/* cipher context util routines */
+CamelCipherHash camel_cipher_id_to_hash(CamelCipherContext *context, const char *id);
+const char * camel_cipher_hash_to_id(CamelCipherContext *context, CamelCipherHash hash);
+
/* CamelCipherValidity utility functions */
CamelCipherValidity *camel_cipher_validity_new (void);