aboutsummaryrefslogtreecommitdiff
path: root/src/olm.cpp
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-07-09 18:35:54 +0100
committerMark Haines <mark.haines@matrix.org>2015-07-09 18:35:54 +0100
commit373acefde7be92f86b8294b325519ad916b1e054 (patch)
tree9d80437d0b059808eb3cd960d4517fdc59ab4731 /src/olm.cpp
parent5634be05074168e33b77246bbc9b60bd683759d8 (diff)
Add c bindings for the methods for managing one time keys
Diffstat (limited to 'src/olm.cpp')
-rw-r--r--src/olm.cpp35
1 files changed, 35 insertions, 0 deletions
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,