From 373acefde7be92f86b8294b325519ad916b1e054 Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Thu, 9 Jul 2015 18:35:54 +0100 Subject: Add c bindings for the methods for managing one time keys --- src/olm.cpp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'src/olm.cpp') diff --git a/src/olm.cpp b/src/olm.cpp index 65d0648..6450999 100644 --- a/src/olm.cpp +++ b/src/olm.cpp @@ -370,12 +370,47 @@ size_t olm_account_one_time_keys( } +size_t olm_account_mark_keys_as_published( + OlmAccount * account +) { + return from_c(account)->mark_keys_as_published(); +} + + +size_t olm_account_max_number_of_one_time_keys( + OlmAccount * account +) { + return from_c(account)->max_number_of_one_time_keys(); +} + + +size_t olm_account_generate_one_time_keys_random_length( + OlmAccount * account, + size_t number_of_keys +) { + return from_c(account)->generate_one_time_keys_random_length(number_of_keys); +} + + +size_t olm_account_generate_one_time_keys( + OlmAccount * account, + size_t number_of_keys, + void const * random, size_t random_length +) { + return from_c(account)->generate_one_time_keys( + number_of_keys, + from_c(random), random_length + ); +} + + size_t olm_create_outbound_session_random_length( OlmSession * session ) { return from_c(session)->new_outbound_session_random_length(); } + size_t olm_create_outbound_session( OlmSession * session, OlmAccount * account, -- cgit v1.2.3