aboutsummaryrefslogtreecommitdiff
path: root/include/olm/olm.h
diff options
context:
space:
mode:
authorHubert Chathi <hubert@uhoreg.ca>2020-08-14 17:29:25 -0400
committerHubert Chathi <hubert@uhoreg.ca>2020-08-14 17:29:41 -0400
commit171044f3fca084bd1c5c1f8f4bfe146434b07f0b (patch)
treee0d81cc51b02e46bfae638203744f846ec41e380 /include/olm/olm.h
parenta0284c2ba36ac8433ea752e93b4a0a331a3f0c0b (diff)
add support for fallback keys
Diffstat (limited to 'include/olm/olm.h')
-rw-r--r--include/olm/olm.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/olm/olm.h b/include/olm/olm.h
index 6a2b3fb..11d99b4 100644
--- a/include/olm/olm.h
+++ b/include/olm/olm.h
@@ -254,6 +254,31 @@ size_t olm_account_generate_one_time_keys(
void * random, size_t random_length
);
+/** The number of random bytes needed to generate a fallback key. */
+size_t olm_account_generate_fallback_key_random_length(
+ OlmAccount * account
+);
+
+/** Generates a new fallback key. Only one previous fallback key is
+ * stored. Returns olm_error() on error. If the number of random bytes is too
+ * small then olm_account_last_error() will be "NOT_ENOUGH_RANDOM". */
+size_t olm_account_generate_fallback_key(
+ OlmAccount * account,
+ void * random, size_t random_length
+);
+
+/** The number of bytes needed to hold the fallback key as returned by
+ * olm_account_fallback_key. */
+size_t olm_account_fallback_key_length(
+ OlmAccount * account
+);
+
+size_t olm_account_fallback_key(
+ OlmAccount * account,
+ void * fallback_key, size_t fallback_key_size
+);
+
+
/** The number of random bytes needed to create an outbound session */
size_t olm_create_outbound_session_random_length(
OlmSession * session