diff options
author | iphydf <iphydf@users.noreply.github.com> | 2016-12-19 02:47:42 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2016-12-22 10:26:59 +0000 |
commit | ce29c8e7ec91d95167b2dea3aee9fd1ae1aac254 (patch) | |
tree | a288df55c44e8edf816e6abbde19a70faef73394 /toxcore/util.c | |
parent | 7122d2e862e028a730478d88cd61557fbed16ebf (diff) |
Wrap all sodium/nacl functions in crypto_core.c.
Diffstat (limited to 'toxcore/util.c')
-rw-r--r-- | toxcore/util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/toxcore/util.c b/toxcore/util.c index 25068db6..2dfa360e 100644 --- a/toxcore/util.c +++ b/toxcore/util.c | |||
@@ -28,7 +28,7 @@ | |||
28 | 28 | ||
29 | #include "util.h" | 29 | #include "util.h" |
30 | 30 | ||
31 | #include "crypto_core.h" /* for crypto_box_PUBLICKEYBYTES */ | 31 | #include "crypto_core.h" /* for CRYPTO_PUBLIC_KEY_SIZE */ |
32 | 32 | ||
33 | #include <time.h> | 33 | #include <time.h> |
34 | 34 | ||
@@ -65,8 +65,8 @@ bool id_equal(const uint8_t *dest, const uint8_t *src) | |||
65 | 65 | ||
66 | uint32_t id_copy(uint8_t *dest, const uint8_t *src) | 66 | uint32_t id_copy(uint8_t *dest, const uint8_t *src) |
67 | { | 67 | { |
68 | memcpy(dest, src, crypto_box_PUBLICKEYBYTES); | 68 | memcpy(dest, src, CRYPTO_PUBLIC_KEY_SIZE); |
69 | return crypto_box_PUBLICKEYBYTES; | 69 | return CRYPTO_PUBLIC_KEY_SIZE; |
70 | } | 70 | } |
71 | 71 | ||
72 | void host_to_net(uint8_t *num, uint16_t numbytes) | 72 | void host_to_net(uint8_t *num, uint16_t numbytes) |