aboutsummaryrefslogtreecommitdiff
path: root/src/axolotl.cpp
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-06-16 15:15:40 +0100
committerMark Haines <mark.haines@matrix.org>2015-06-16 15:15:40 +0100
commit76f49cf17780c155dd02d39ebc40e1f62c0c2503 (patch)
treee4194d0feca2ac165ee8335af9155c981c1bbb0b /src/axolotl.cpp
parent11861404e444795a5437dcf193e71f68a96b5a59 (diff)
Add a test for the axolotl API
Diffstat (limited to 'src/axolotl.cpp')
-rw-r--r--src/axolotl.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/axolotl.cpp b/src/axolotl.cpp
index e11e2b0..e835c9b 100644
--- a/src/axolotl.cpp
+++ b/src/axolotl.cpp
@@ -67,7 +67,6 @@ std::size_t enc_output(
std::size_t length = ciphertext_length + PICKLE_CIPHER.mac_length();
std::size_t base64_length = axolotl::encode_base64_length(length);
std::uint8_t * raw_output = output + base64_length - length;
- length -= PICKLE_CIPHER.mac_length();
PICKLE_CIPHER.encrypt(
key, key_length,
raw_output, raw_length,
@@ -395,6 +394,12 @@ size_t axolotl_account_one_time_keys(
}
+size_t axolotl_create_outbound_session_random_length(
+ AxolotlSession * session
+) {
+ return from_c(session)->new_outbound_session_random_length();
+}
+
size_t axolotl_create_outbound_session(
AxolotlSession * session,
AxolotlAccount * account,