aboutsummaryrefslogtreecommitdiff
path: root/python/olm/inbound_group_session.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/olm/inbound_group_session.py')
-rw-r--r--python/olm/inbound_group_session.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/python/olm/inbound_group_session.py b/python/olm/inbound_group_session.py
index 67906b2..4390b34 100644
--- a/python/olm/inbound_group_session.py
+++ b/python/olm/inbound_group_session.py
@@ -37,6 +37,10 @@ inbound_group_session_function(
)
inbound_group_session_function(
+ lib.olm_import_inbound_group_session, c_void_p, c_size_t
+)
+
+inbound_group_session_function(
lib.olm_group_decrypt_max_plaintext_length, c_void_p, c_size_t
)
inbound_group_session_function(
@@ -83,6 +87,12 @@ class InboundGroupSession(object):
self.ptr, key_buffer, len(session_key)
)
+ def import_session(self, session_key):
+ key_buffer = create_string_buffer(session_key)
+ lib.olm_import_inbound_group_session(
+ self.ptr, key_buffer, len(session_key)
+ )
+
def decrypt(self, message):
message_buffer = create_string_buffer(message)
max_plaintext_length = lib.olm_group_decrypt_max_plaintext_length(