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/TCP_client.h | |
parent | 7122d2e862e028a730478d88cd61557fbed16ebf (diff) |
Wrap all sodium/nacl functions in crypto_core.c.
Diffstat (limited to 'toxcore/TCP_client.h')
-rw-r--r-- | toxcore/TCP_client.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/toxcore/TCP_client.h b/toxcore/TCP_client.h index 44049698..5b29f1db 100644 --- a/toxcore/TCP_client.h +++ b/toxcore/TCP_client.h | |||
@@ -53,16 +53,16 @@ enum { | |||
53 | typedef struct { | 53 | typedef struct { |
54 | uint8_t status; | 54 | uint8_t status; |
55 | sock_t sock; | 55 | sock_t sock; |
56 | uint8_t self_public_key[crypto_box_PUBLICKEYBYTES]; /* our public key */ | 56 | uint8_t self_public_key[CRYPTO_PUBLIC_KEY_SIZE]; /* our public key */ |
57 | uint8_t public_key[crypto_box_PUBLICKEYBYTES]; /* public key of the server */ | 57 | uint8_t public_key[CRYPTO_PUBLIC_KEY_SIZE]; /* public key of the server */ |
58 | IP_Port ip_port; /* The ip and port of the server */ | 58 | IP_Port ip_port; /* The ip and port of the server */ |
59 | TCP_Proxy_Info proxy_info; | 59 | TCP_Proxy_Info proxy_info; |
60 | uint8_t recv_nonce[crypto_box_NONCEBYTES]; /* Nonce of received packets. */ | 60 | uint8_t recv_nonce[CRYPTO_NONCE_SIZE]; /* Nonce of received packets. */ |
61 | uint8_t sent_nonce[crypto_box_NONCEBYTES]; /* Nonce of sent packets. */ | 61 | uint8_t sent_nonce[CRYPTO_NONCE_SIZE]; /* Nonce of sent packets. */ |
62 | uint8_t shared_key[crypto_box_BEFORENMBYTES]; | 62 | uint8_t shared_key[CRYPTO_SHARED_KEY_SIZE]; |
63 | uint16_t next_packet_length; | 63 | uint16_t next_packet_length; |
64 | 64 | ||
65 | uint8_t temp_secret_key[crypto_box_SECRETKEYBYTES]; | 65 | uint8_t temp_secret_key[CRYPTO_SECRET_KEY_SIZE]; |
66 | 66 | ||
67 | uint8_t last_packet[2 + MAX_PACKET_SIZE]; | 67 | uint8_t last_packet[2 + MAX_PACKET_SIZE]; |
68 | uint16_t last_packet_length; | 68 | uint16_t last_packet_length; |
@@ -80,7 +80,7 @@ typedef struct { | |||
80 | 80 | ||
81 | struct { | 81 | struct { |
82 | uint8_t status; /* 0 if not used, 1 if other is offline, 2 if other is online. */ | 82 | uint8_t status; /* 0 if not used, 1 if other is offline, 2 if other is online. */ |
83 | uint8_t public_key[crypto_box_PUBLICKEYBYTES]; | 83 | uint8_t public_key[CRYPTO_PUBLIC_KEY_SIZE]; |
84 | uint32_t number; | 84 | uint32_t number; |
85 | } connections[NUM_CLIENT_CONNECTIONS]; | 85 | } connections[NUM_CLIENT_CONNECTIONS]; |
86 | int (*response_callback)(void *object, uint8_t connection_id, const uint8_t *public_key); | 86 | int (*response_callback)(void *object, uint8_t connection_id, const uint8_t *public_key); |