From d3d5b701cb940e5f6c7cb2af199428fc8224e665 Mon Sep 17 00:00:00 2001 From: yangfl Date: Wed, 19 Sep 2018 11:15:50 +0800 Subject: Fix typos --- toxcore/DHT.c | 4 ++-- toxcore/DHT.h | 2 +- toxcore/crypto_core.api.h | 2 +- toxcore/crypto_core.h | 2 +- toxcore/crypto_core_test.cc | 4 ++-- toxcore/onion.c | 2 +- toxcore/onion.h | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) (limited to 'toxcore') 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 { /* number of times get_node packets were sent. */ uint32_t bootstrap_times; - /* Symetric NAT hole punching stuff. */ + /* Symmetric NAT hole punching stuff. */ NAT nat; uint16_t lock_count; @@ -238,7 +238,7 @@ static unsigned int bit_by_bit_cmp(const uint8_t *pk1, const uint8_t *pk2) return i * 8 + j; } -/* Shared key generations are costly, it is therefor smart to store commonly used +/* Shared key generations are costly, it is therefore smart to store commonly used * ones so that they can re used later without being computed again. * * 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); /*----------------------------------------------------------------------------------*/ -/* Shared key generations are costly, it is therefor smart to store commonly used +/* Shared key generations are costly, it is therefore smart to store commonly used * ones so that they can re used later without being computed again. * * 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( /** * Fast encrypt/decrypt operations. Use if this is not a one-time communication. * $encrypt_precompute does the shared-key generation once so it does not have - * to be preformed on every encrypt/decrypt. + * to be performed on every encrypt/decrypt. */ static int32_t encrypt_precompute( 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 /** * Fast encrypt/decrypt operations. Use if this is not a one-time communication. * encrypt_precompute does the shared-key generation once so it does not have - * to be preformed on every encrypt/decrypt. + * to be performed on every encrypt/decrypt. */ int32_t encrypt_precompute(const uint8_t *public_key, const uint8_t *secret_key, uint8_t *shared_key); 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) { EXPECT_LT(delta, CRYPTO_TEST_MEMCMP_EPS) << "Delta time is too long (" << delta << " >= " << CRYPTO_TEST_MEMCMP_EPS << ")\n" - << "Time of the same data comparation: " << same_median << " clocks\n" - << "Time of the different data comparation: " << not_same_median << " clocks"; + << "Time of the same data comparison: " << same_median << " clocks\n" + << "Time of the different data comparison: " << not_same_median << " clocks"; } } // 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 * * Create a new onion path out of nodes (nodes is a list of ONION_PATH_LENGTH nodes) * - * new_path must be an empty memory location of atleast Onion_Path size. + * new_path must be an empty memory location of at least Onion_Path size. * * return -1 on failure. * 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 { * * Create a new onion path out of nodes (nodes is a list of ONION_PATH_LENGTH nodes) * - * new_path must be an empty memory location of atleast Onion_Path size. + * new_path must be an empty memory location of at least Onion_Path size. * * return -1 on failure. * return 0 on success. -- cgit v1.2.3