From 1b15465c42a88f750a960a0e73f186245f9bba33 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 24 May 2016 16:23:19 +0100 Subject: Separate base64ing from the rest of msg encoding Factor the actual message encoding/decoding and encrypting/decrypting out to separate functions from the top-level functions which do the base64-wrangling. This is particularly helpful in the 'outbound' code-path where the offsets required to allow room to base64-encode make the flow hard to see when it's all inline. --- include/olm/message.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/olm/message.h') diff --git a/include/olm/message.h b/include/olm/message.h index cff15f3..e80d54c 100644 --- a/include/olm/message.h +++ b/include/olm/message.h @@ -53,8 +53,10 @@ size_t _olm_encode_group_message_length( * olm_encode_group_message_length() bytes long. * ciphertext_ptr: returns the address that the ciphertext * should be written to, followed by the MAC. + * + * Returns the size of the message, up to the MAC. */ -void _olm_encode_group_message( +size_t _olm_encode_group_message( uint8_t version, const uint8_t *session_id, size_t session_id_length, -- cgit v1.2.3