From 833ecd3c736cea71a693cd9dedec4f1bffa87000 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Mon, 5 Sep 2016 12:59:12 +0100 Subject: Convert ed25519 pickling functions to C ... so that I can use them from the group session bits. --- src/account.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/account.cpp') diff --git a/src/account.cpp b/src/account.cpp index c77f95c..248f3d1 100644 --- a/src/account.cpp +++ b/src/account.cpp @@ -14,6 +14,7 @@ */ #include "olm/account.hh" #include "olm/base64.hh" +#include "olm/pickle.h" #include "olm/pickle.hh" #include "olm/memory.hh" @@ -265,7 +266,7 @@ static std::size_t pickle_length( olm::IdentityKeys const & value ) { size_t length = 0; - length += olm::pickle_length(value.ed25519_key); + length += _olm_pickle_ed25519_key_pair_length(&value.ed25519_key); length += olm::pickle_length(value.curve25519_key); return length; } @@ -275,7 +276,7 @@ static std::uint8_t * pickle( std::uint8_t * pos, olm::IdentityKeys const & value ) { - pos = olm::pickle(pos, value.ed25519_key); + pos = _olm_pickle_ed25519_key_pair(pos, &value.ed25519_key); pos = olm::pickle(pos, value.curve25519_key); return pos; } @@ -285,7 +286,7 @@ static std::uint8_t const * unpickle( std::uint8_t const * pos, std::uint8_t const * end, olm::IdentityKeys & value ) { - pos = olm::unpickle(pos, end, value.ed25519_key); + pos = _olm_unpickle_ed25519_key_pair(pos, end, &value.ed25519_key); pos = olm::unpickle(pos, end, value.curve25519_key); return pos; } -- cgit v1.2.3