aboutsummaryrefslogtreecommitdiff
path: root/python/olm/inbound_group_session.py
diff options
context:
space:
mode:
authorpedroGitt <pedro.contreiras@amdocs.com>2016-11-23 00:04:58 +0100
committerpedroGitt <pedro.contreiras@amdocs.com>2016-11-23 00:04:58 +0100
commit7a6897642baa8fc5d9d9f14c80fc4f201cfe2173 (patch)
tree9325a7d7d3ac40747f49af22378dcf9bc5c0dd0b /python/olm/inbound_group_session.py
parentc725a561a283f508e68516ded86d141214f5ea06 (diff)
parentf6c05be8c5d35e725a8a2ed5ad661398ac9f8cd2 (diff)
Merge remote-tracking branch 'origin/master' into pedroc/android_e2e_dev
Diffstat (limited to 'python/olm/inbound_group_session.py')
-rw-r--r--python/olm/inbound_group_session.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/python/olm/inbound_group_session.py b/python/olm/inbound_group_session.py
index d5547fd..27a569c 100644
--- a/python/olm/inbound_group_session.py
+++ b/python/olm/inbound_group_session.py
@@ -43,6 +43,7 @@ inbound_group_session_function(
lib.olm_group_decrypt,
c_void_p, c_size_t, # message
c_void_p, c_size_t, # plaintext
+ POINTER(c_uint32), # message_index
)
inbound_group_session_function(lib.olm_inbound_group_session_id_length)
@@ -82,11 +83,14 @@ class InboundGroupSession(object):
)
plaintext_buffer = create_string_buffer(max_plaintext_length)
message_buffer = create_string_buffer(message)
+
+ message_index = c_uint32()
plaintext_length = lib.olm_group_decrypt(
self.ptr, message_buffer, len(message),
- plaintext_buffer, max_plaintext_length
+ plaintext_buffer, max_plaintext_length,
+ byref(message_index)
)
- return plaintext_buffer.raw[:plaintext_length]
+ return plaintext_buffer.raw[:plaintext_length], message_index
def session_id(self):
id_length = lib.olm_inbound_group_session_id_length(self.ptr)