aboutsummaryrefslogtreecommitdiff
path: root/src/account.cpp
diff options
context:
space:
mode:
authorRichard van der Hoff <github@rvanderhoff.org.uk>2016-09-06 11:08:04 +0100
committerGitHub <noreply@github.com>2016-09-06 11:08:04 +0100
commit7c84ce8098f58b28e9996f8644caafef8d32d308 (patch)
tree3ffbabe907b4a3f46d740d01114016add4539300 /src/account.cpp
parent8912d13b0b856e5eb3e43594260dd5da3ad6535c (diff)
parent833ecd3c736cea71a693cd9dedec4f1bffa87000 (diff)
Merge pull request #18 from matrix-org/rav/pickle_ed25519_in_c
Convert ed25519 pickling functions to C
Diffstat (limited to 'src/account.cpp')
-rw-r--r--src/account.cpp7
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;
}