diff options
author | Richard van der Hoff <richard@matrix.org> | 2016-09-05 12:59:12 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2016-09-05 12:59:12 +0100 |
commit | 833ecd3c736cea71a693cd9dedec4f1bffa87000 (patch) | |
tree | 487626a261a69640e00baa7ff888a35e08b42fbe /src/account.cpp | |
parent | c09aa77c4a8dd27d98d2fe454fa1b589fee47977 (diff) |
Convert ed25519 pickling functions to C
... so that I can use them from the group session bits.
Diffstat (limited to 'src/account.cpp')
-rw-r--r-- | src/account.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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; } |