aboutsummaryrefslogtreecommitdiff
path: root/include/axolotl/ratchet.hh
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-06-11 18:03:22 +0100
committerMark Haines <mark.haines@matrix.org>2015-06-11 18:03:22 +0100
commit793b9b910a8f3c010a55433188e4b63414cbb314 (patch)
treeca5f8621273bc4b55f7e584a39529954a84da14c /include/axolotl/ratchet.hh
parentbcb05d1a9982c0a22e41ecfa6f9aba212587c782 (diff)
Start writing the interfaces for session and the account objects
Diffstat (limited to 'include/axolotl/ratchet.hh')
-rw-r--r--include/axolotl/ratchet.hh15
1 files changed, 3 insertions, 12 deletions
diff --git a/include/axolotl/ratchet.hh b/include/axolotl/ratchet.hh
index d5053b2..f7d30d0 100644
--- a/include/axolotl/ratchet.hh
+++ b/include/axolotl/ratchet.hh
@@ -15,6 +15,7 @@
#include "axolotl/crypto.hh"
#include "axolotl/list.hh"
+#include "axolotl/error.hh"
namespace axolotl {
@@ -53,16 +54,6 @@ struct SkippedMessageKey {
};
-enum struct ErrorCode {
- SUCCESS = 0, /*!< There wasn't an error */
- NOT_ENOUGH_RANDOM = 1, /*!< Not enough entropy was supplied */
- OUTPUT_BUFFER_TOO_SMALL = 2, /*!< Supplied output buffer is too small */
- BAD_MESSAGE_VERSION = 3, /*!< The message version is unsupported */
- BAD_MESSAGE_FORMAT = 4, /*!< The message couldn't be decoded */
- BAD_MESSAGE_MAC = 5, /*!< The message couldn't be decrypted */
-};
-
-
static std::size_t const MAX_RECEIVER_CHAINS = 5;
static std::size_t const MAX_SKIPPED_MESSAGE_KEYS = 40;
@@ -124,12 +115,12 @@ struct Ratchet {
);
/** The number of bytes needed to persist the current session. */
- std::size_t pickle_max_output_length();
+ std::size_t pickle_length();
/** Persists a session as a sequence of bytes
* Returns the number of output bytes used. */
std::size_t pickle(
- std::uint8_t * output, std::size_t max_output_length
+ std::uint8_t * output, std::size_t output_length
);
/** Loads a session from a sequence of bytes.