From 793b9b910a8f3c010a55433188e4b63414cbb314 Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Thu, 11 Jun 2015 18:03:22 +0100 Subject: Start writing the interfaces for session and the account objects --- include/axolotl/ratchet.hh | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'include/axolotl/ratchet.hh') 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. -- cgit v1.2.3