summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorslvr <slvr@unsafeio.com>2013-08-14 14:26:04 +0100
committerslvr <slvr@unsafeio.com>2013-08-14 14:26:04 +0100
commit0b27a0cb355a15fddbce639e66d5af2c2106526a (patch)
tree00151ad873c59c1fc4bb7ce538514ff1e5ada460
parenta8d1f86f8ba9b39c8f913bce99a2282d81235cc9 (diff)
Incorrect constants: 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 07c43c40..0d8ad4c7 100644
--- a/core/net_crypto.c
+++ b/core/net_crypto.c
@@ -81,7 +81,7 @@ int encrypt_data(uint8_t *public_key, uint8_t *secret_key, uint8_t *nonce,
81 if (length + crypto_box_MACBYTES > MAX_DATA_SIZE || length == 0) 81 if (length + crypto_box_MACBYTES > MAX_DATA_SIZE || length == 0)
82 return -1; 82 return -1;
83 83
84 uint8_t temp_plain[MAX_DATA_SIZE + crypto_box_BOXZEROBYTES] = {0}; 84 uint8_t temp_plain[MAX_DATA_SIZE + crypto_box_ZEROBYTES] = {0};
85 uint8_t temp_encrypted[MAX_DATA_SIZE + crypto_box_BOXZEROBYTES]; 85 uint8_t temp_encrypted[MAX_DATA_SIZE + crypto_box_BOXZEROBYTES];
86 86
87 memcpy(temp_plain + crypto_box_ZEROBYTES, plain, length); /* pad the message with 32 0 bytes. */ 87 memcpy(temp_plain + crypto_box_ZEROBYTES, plain, length); /* pad the message with 32 0 bytes. */
@@ -114,7 +114,7 @@ int encrypt_data_fast(uint8_t *enc_key, uint8_t *nonce,
114 if (length + crypto_box_MACBYTES > MAX_DATA_SIZE || length == 0) 114 if (length + crypto_box_MACBYTES > MAX_DATA_SIZE || length == 0)
115 return -1; 115 return -1;
116 116
117 uint8_t temp_plain[MAX_DATA_SIZE + crypto_box_BOXZEROBYTES] = {0}; 117 uint8_t temp_plain[MAX_DATA_SIZE + crypto_box_ZEROBYTES] = {0};
118 uint8_t temp_encrypted[MAX_DATA_SIZE + crypto_box_BOXZEROBYTES]; 118 uint8_t temp_encrypted[MAX_DATA_SIZE + crypto_box_BOXZEROBYTES];
119 119
120 memcpy(temp_plain + crypto_box_ZEROBYTES, plain, length); /* pad the message with 32 0 bytes. */ 120 memcpy(temp_plain + crypto_box_ZEROBYTES, plain, length); /* pad the message with 32 0 bytes. */