aboutsummaryrefslogtreecommitdiff
path: root/include/axolotl/account.hh
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-06-12 14:09:41 +0100
committerMark Haines <mark.haines@matrix.org>2015-06-12 14:09:41 +0100
commit6ecea67718803e96e00a18f97ae8abc83ecaa1c2 (patch)
tree41de34500c1dfa104b791606a67b6bcf84a14ed9 /include/axolotl/account.hh
parent08a7e44a966047a10d7e959d4a8cdeaaf4139ce0 (diff)
Implement the session key exchange
Diffstat (limited to 'include/axolotl/account.hh')
-rw-r--r--include/axolotl/account.hh9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/axolotl/account.hh b/include/axolotl/account.hh
index 5edb799..dd9c819 100644
--- a/include/axolotl/account.hh
+++ b/include/axolotl/account.hh
@@ -2,6 +2,8 @@
#define AXOLOTL_ACCOUNT_HH_
#include "axolotl/list.hh"
+#include "axolotl/crypto.hh"
+#include "axolotl/error.hh"
#include <cstdint>
@@ -25,16 +27,21 @@ struct Account {
LocalKey identity_key;
LocalKey last_resort_one_time_key;
List<LocalKey, MAX_ONE_TIME_KEYS> one_time_keys;
+ ErrorCode last_error;
/** Number of random bytes needed to create a new account */
std::size_t new_account_random_length();
/** Create a new account. Returns NOT_ENOUGH_RANDOM if the number of random
* bytes is too small. */
- ErrorCode new_account(
+ std::size_t new_account(
uint8_t const * random, std::size_t random_length
);
+ LocalKey const * lookup_key(
+ std::uint32_t id
+ );
+
/** The number of bytes needed to persist this account. */
std::size_t pickle_length();