aboutsummaryrefslogtreecommitdiff
path: root/include/olm/message.h
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2016-05-18 17:23:09 +0100
committerRichard van der Hoff <richard@matrix.org>2016-05-24 13:39:34 +0100
commit39ad75314b9e28053f568ed6a4109f5d3a9468fe (patch)
tree72f7453ebbcbaa2513391c87b8b960092bb05ffa /include/olm/message.h
parent8b1514c0a653ccc3f49db70131d7d4f7524f1f9b (diff)
Implement decrypting inbound group messages
Includes creation of inbound sessions, etc
Diffstat (limited to 'include/olm/message.h')
-rw-r--r--include/olm/message.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/olm/message.h b/include/olm/message.h
index 05fb56c..bd7aec3 100644
--- a/include/olm/message.h
+++ b/include/olm/message.h
@@ -65,6 +65,30 @@ void _olm_encode_group_message(
);
+struct _OlmDecodeGroupMessageResults {
+ uint8_t version;
+ const uint8_t *session_id;
+ size_t session_id_length;
+ uint32_t chain_index;
+ int has_chain_index;
+ const uint8_t *ciphertext;
+ size_t ciphertext_length;
+};
+
+
+/**
+ * Reads the message headers from the input buffer.
+ */
+void _olm_decode_group_message(
+ const uint8_t *input, size_t input_length,
+ size_t mac_length,
+
+ /* output structure: updated with results */
+ struct _OlmDecodeGroupMessageResults *results
+);
+
+
+
#ifdef __cplusplus
} // extern "C"
#endif