summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorslvr <slvr@unsafeio.com>2013-08-14 14:29:39 +0100
committerslvr <slvr@unsafeio.com>2013-08-14 14:29:39 +0100
commitee34b51c24acfcee7c155b3b056a16dded8a27bc (patch)
tree6de43d9b2c9b1fb7af5467464bb34ed1c47763c0
parent0b27a0cb355a15fddbce639e66d5af2c2106526a (diff)
s/BOXZERO/ZERO/
-rw-r--r--core/net_crypto.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/net_crypto.c b/core/net_crypto.c
index 0d8ad4c7..fd606335 100644
--- a/core/net_crypto.c
+++ b/core/net_crypto.c
@@ -139,7 +139,7 @@ int decrypt_data(uint8_t *public_key, uint8_t *secret_key, uint8_t *nonce,
139 if (length > MAX_DATA_SIZE || length <= crypto_box_BOXZEROBYTES) 139 if (length > MAX_DATA_SIZE || length <= crypto_box_BOXZEROBYTES)
140 return -1; 140 return -1;
141 141
142 uint8_t temp_plain[MAX_DATA_SIZE + crypto_box_BOXZEROBYTES]; 142 uint8_t temp_plain[MAX_DATA_SIZE + crypto_box_ZEROBYTES];
143 uint8_t temp_encrypted[MAX_DATA_SIZE + crypto_box_BOXZEROBYTES] = {0}; 143 uint8_t temp_encrypted[MAX_DATA_SIZE + crypto_box_BOXZEROBYTES] = {0};
144 144
145 memcpy(temp_encrypted + crypto_box_BOXZEROBYTES, encrypted, length); /* pad the message with 16 0 bytes. */ 145 memcpy(temp_encrypted + crypto_box_BOXZEROBYTES, encrypted, length); /* pad the message with 16 0 bytes. */
@@ -165,7 +165,7 @@ int decrypt_data_fast(uint8_t *enc_key, uint8_t *nonce,
165 if (length > MAX_DATA_SIZE || length <= crypto_box_BOXZEROBYTES) 165 if (length > MAX_DATA_SIZE || length <= crypto_box_BOXZEROBYTES)
166 return -1; 166 return -1;
167 167
168 uint8_t temp_plain[MAX_DATA_SIZE + crypto_box_BOXZEROBYTES]; 168 uint8_t temp_plain[MAX_DATA_SIZE + crypto_box_ZEROBYTES];
169 uint8_t temp_encrypted[MAX_DATA_SIZE + crypto_box_BOXZEROBYTES] = {0}; 169 uint8_t temp_encrypted[MAX_DATA_SIZE + crypto_box_BOXZEROBYTES] = {0};
170 170
171 memcpy(temp_encrypted + crypto_box_BOXZEROBYTES, encrypted, length); /* pad the message with 16 0 bytes. */ 171 memcpy(temp_encrypted + crypto_box_BOXZEROBYTES, encrypted, length); /* pad the message with 16 0 bytes. */