diff options
author | Richard van der Hoff <richard@matrix.org> | 2017-01-06 17:40:39 +0000 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2017-01-09 17:45:46 +0000 |
commit | a2f0c93a93f6914291954b08a7518b4f17561c11 (patch) | |
tree | fc75bc7e84808868bc4b9eb3844115bab277ada2 /include/olm/inbound_group_session.h | |
parent | 5fbeb3e29b6440a799d9320e871a1d4d509130b8 (diff) |
Implement importing group session data
olm_import_inbound_group_session, which reads the format written by
olm_export_inbound_group_session to initialise a group session.
Diffstat (limited to 'include/olm/inbound_group_session.h')
-rw-r--r-- | include/olm/inbound_group_session.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/include/olm/inbound_group_session.h b/include/olm/inbound_group_session.h index d47af8a..739a89b 100644 --- a/include/olm/inbound_group_session.h +++ b/include/olm/inbound_group_session.h @@ -85,7 +85,8 @@ size_t olm_unpickle_inbound_group_session( /** - * Start a new inbound group session, based on the parameters supplied. + * Start a new inbound group session, from a key exported from + * olm_outbound_group_session_key * * Returns olm_error() on failure. On failure last_error will be set with an * error code. The last_error will be: @@ -100,6 +101,23 @@ size_t olm_init_inbound_group_session( ); /** + * Import an inbound group session, from a previous export. + * + * Returns olm_error() on failure. On failure last_error will be set with an + * error code. The last_error will be: + * + * * OLM_INVALID_BASE64 if the session_key is not valid base64 + * * OLM_BAD_SESSION_KEY if the session_key is invalid + */ +size_t olm_import_inbound_group_session( + OlmInboundGroupSession *session, + /* base64-encoded keys; note that it will be overwritten with the base64-decoded + data. */ + uint8_t const * session_key, size_t session_key_length +); + + +/** * Get an upper bound on the number of bytes of plain-text the decrypt method * will write for a given input message length. The actual size could be * different due to padding. |