diff options
author | yangfl <yangfl@users.noreply.github.com> | 2018-09-19 11:15:50 +0800 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-09-19 18:16:13 +0000 |
commit | d3d5b701cb940e5f6c7cb2af199428fc8224e665 (patch) | |
tree | 227460e1cde95443856ccbc5f0bcf082874bd41c /toxcore | |
parent | 758bd9aa871666e1003691531f22f6dc515625bf (diff) |
Fix typos
Diffstat (limited to 'toxcore')
-rw-r--r-- | toxcore/DHT.c | 4 | ||||
-rw-r--r-- | toxcore/DHT.h | 2 | ||||
-rw-r--r-- | toxcore/crypto_core.api.h | 2 | ||||
-rw-r--r-- | toxcore/crypto_core.h | 2 | ||||
-rw-r--r-- | toxcore/crypto_core_test.cc | 4 | ||||
-rw-r--r-- | toxcore/onion.c | 2 | ||||
-rw-r--r-- | toxcore/onion.h | 2 |
7 files changed, 9 insertions, 9 deletions
diff --git a/toxcore/DHT.c b/toxcore/DHT.c index a1025300..1eebb0c7 100644 --- a/toxcore/DHT.c +++ b/toxcore/DHT.c | |||
@@ -76,7 +76,7 @@ struct DHT_Friend { | |||
76 | /* number of times get_node packets were sent. */ | 76 | /* number of times get_node packets were sent. */ |
77 | uint32_t bootstrap_times; | 77 | uint32_t bootstrap_times; |
78 | 78 | ||
79 | /* Symetric NAT hole punching stuff. */ | 79 | /* Symmetric NAT hole punching stuff. */ |
80 | NAT nat; | 80 | NAT nat; |
81 | 81 | ||
82 | uint16_t lock_count; | 82 | uint16_t lock_count; |
@@ -238,7 +238,7 @@ static unsigned int bit_by_bit_cmp(const uint8_t *pk1, const uint8_t *pk2) | |||
238 | return i * 8 + j; | 238 | return i * 8 + j; |
239 | } | 239 | } |
240 | 240 | ||
241 | /* Shared key generations are costly, it is therefor smart to store commonly used | 241 | /* Shared key generations are costly, it is therefore smart to store commonly used |
242 | * ones so that they can re used later without being computed again. | 242 | * ones so that they can re used later without being computed again. |
243 | * | 243 | * |
244 | * If shared key is already in shared_keys, copy it to shared_key. | 244 | * If shared key is already in shared_keys, copy it to shared_key. |
diff --git a/toxcore/DHT.h b/toxcore/DHT.h index cbe905ce..5feb74d2 100644 --- a/toxcore/DHT.h +++ b/toxcore/DHT.h | |||
@@ -235,7 +235,7 @@ const uint8_t *dht_get_friend_public_key(const DHT *dht, uint32_t friend_num); | |||
235 | 235 | ||
236 | /*----------------------------------------------------------------------------------*/ | 236 | /*----------------------------------------------------------------------------------*/ |
237 | 237 | ||
238 | /* Shared key generations are costly, it is therefor smart to store commonly used | 238 | /* Shared key generations are costly, it is therefore smart to store commonly used |
239 | * ones so that they can re used later without being computed again. | 239 | * ones so that they can re used later without being computed again. |
240 | * | 240 | * |
241 | * If shared key is already in shared_keys, copy it to shared_key. | 241 | * If shared key is already in shared_keys, copy it to shared_key. |
diff --git a/toxcore/crypto_core.api.h b/toxcore/crypto_core.api.h index 94ccac47..b6b49624 100644 --- a/toxcore/crypto_core.api.h +++ b/toxcore/crypto_core.api.h | |||
@@ -207,7 +207,7 @@ static int32_t decrypt_data( | |||
207 | /** | 207 | /** |
208 | * Fast encrypt/decrypt operations. Use if this is not a one-time communication. | 208 | * Fast encrypt/decrypt operations. Use if this is not a one-time communication. |
209 | * $encrypt_precompute does the shared-key generation once so it does not have | 209 | * $encrypt_precompute does the shared-key generation once so it does not have |
210 | * to be preformed on every encrypt/decrypt. | 210 | * to be performed on every encrypt/decrypt. |
211 | */ | 211 | */ |
212 | static int32_t encrypt_precompute( | 212 | static int32_t encrypt_precompute( |
213 | const uint8_t[CRYPTO_PUBLIC_KEY_SIZE] public_key, | 213 | const uint8_t[CRYPTO_PUBLIC_KEY_SIZE] public_key, |
diff --git a/toxcore/crypto_core.h b/toxcore/crypto_core.h index b287b21e..c2f0296e 100644 --- a/toxcore/crypto_core.h +++ b/toxcore/crypto_core.h | |||
@@ -202,7 +202,7 @@ int32_t decrypt_data(const uint8_t *public_key, const uint8_t *secret_key, const | |||
202 | /** | 202 | /** |
203 | * Fast encrypt/decrypt operations. Use if this is not a one-time communication. | 203 | * Fast encrypt/decrypt operations. Use if this is not a one-time communication. |
204 | * encrypt_precompute does the shared-key generation once so it does not have | 204 | * encrypt_precompute does the shared-key generation once so it does not have |
205 | * to be preformed on every encrypt/decrypt. | 205 | * to be performed on every encrypt/decrypt. |
206 | */ | 206 | */ |
207 | int32_t encrypt_precompute(const uint8_t *public_key, const uint8_t *secret_key, uint8_t *shared_key); | 207 | int32_t encrypt_precompute(const uint8_t *public_key, const uint8_t *secret_key, uint8_t *shared_key); |
208 | 208 | ||
diff --git a/toxcore/crypto_core_test.cc b/toxcore/crypto_core_test.cc index d6888b19..ee3cb366 100644 --- a/toxcore/crypto_core_test.cc +++ b/toxcore/crypto_core_test.cc | |||
@@ -87,8 +87,8 @@ TEST(CryptoCore, MemcmpTimingIsDataIndependent) { | |||
87 | 87 | ||
88 | EXPECT_LT(delta, CRYPTO_TEST_MEMCMP_EPS) | 88 | EXPECT_LT(delta, CRYPTO_TEST_MEMCMP_EPS) |
89 | << "Delta time is too long (" << delta << " >= " << CRYPTO_TEST_MEMCMP_EPS << ")\n" | 89 | << "Delta time is too long (" << delta << " >= " << CRYPTO_TEST_MEMCMP_EPS << ")\n" |
90 | << "Time of the same data comparation: " << same_median << " clocks\n" | 90 | << "Time of the same data comparison: " << same_median << " clocks\n" |
91 | << "Time of the different data comparation: " << not_same_median << " clocks"; | 91 | << "Time of the different data comparison: " << not_same_median << " clocks"; |
92 | } | 92 | } |
93 | 93 | ||
94 | } // namespace | 94 | } // namespace |
diff --git a/toxcore/onion.c b/toxcore/onion.c index eceeb9f8..f1873992 100644 --- a/toxcore/onion.c +++ b/toxcore/onion.c | |||
@@ -114,7 +114,7 @@ static int ipport_unpack(IP_Port *target, const uint8_t *data, unsigned int data | |||
114 | * | 114 | * |
115 | * Create a new onion path out of nodes (nodes is a list of ONION_PATH_LENGTH nodes) | 115 | * Create a new onion path out of nodes (nodes is a list of ONION_PATH_LENGTH nodes) |
116 | * | 116 | * |
117 | * new_path must be an empty memory location of atleast Onion_Path size. | 117 | * new_path must be an empty memory location of at least Onion_Path size. |
118 | * | 118 | * |
119 | * return -1 on failure. | 119 | * return -1 on failure. |
120 | * return 0 on success. | 120 | * return 0 on success. |
diff --git a/toxcore/onion.h b/toxcore/onion.h index 26cf0039..20cd1e5c 100644 --- a/toxcore/onion.h +++ b/toxcore/onion.h | |||
@@ -85,7 +85,7 @@ typedef struct Onion_Path { | |||
85 | * | 85 | * |
86 | * Create a new onion path out of nodes (nodes is a list of ONION_PATH_LENGTH nodes) | 86 | * Create a new onion path out of nodes (nodes is a list of ONION_PATH_LENGTH nodes) |
87 | * | 87 | * |
88 | * new_path must be an empty memory location of atleast Onion_Path size. | 88 | * new_path must be an empty memory location of at least Onion_Path size. |
89 | * | 89 | * |
90 | * return -1 on failure. | 90 | * return -1 on failure. |
91 | * return 0 on success. | 91 | * return 0 on success. |