Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
It turns out, `unix_time` is also monotonic, and is used as such, so I've
renamed the new functions to `mono_time_*`.
2018-07-08:
```
00:01 <@irungentoo> the idea used to be that the unix_time() function
could go backward in time but I think I might have started using it like
if it could not after I changed it so that it would never go back in time
```
|
|
Rules:
1. Constants are uppercase names: THE_CONSTANT.
2. SUE[1] types start with an uppercase letter and have at least one
lowercase letter in it: The_Type, THE_Type.
3. Function types end in "_cb": tox_friend_connection_cb.
4. Variable and function names are all lowercase: the_function.
This makes it easier for humans reading the code to determine what an
identifier means. I'm not convinced by the enum type name change, but I
don't know a better rule. Currently, a lot of enum types are spelled like
constants, which is confusing.
[1] struct/union/enum
|
|
The Family stuff in toxcore is a big mess. I'm sure I saw a bunch of bugs
on the way, but I'm not verifying that code now, so the bugs stay.
|
|
|
|
This changes only code, no string literals or comments.
|
|
|
|
The ping.api.h file looks rather ugly, but it works. This is an exercise
in finding the complete set of use cases needed from apidsl for toxcore.
We'll try to make things work as much as possible, and then make apidsl
better and make the .api.h files pretty.
|
|
|
|
|
|
"All rights reserved" was incorrect. The project was licensed under GPL3,
which means a lot of rights are licensed to everybody in the world, i.e.
not reserved to the "Tox Project".
|
|
|
|
`new_nonce` has been an alias for `random_nonce` for a while now. Having
two names for the same operation is confusing. `random_nonce` better
expresses the intent. The documentation for `new_nonce` talks about
guaranteeing that the nonce is different from previous ones, which is
incorrect, it's just quite likely to be different.
|
|
It is still C code, so still compatible with C compilers as well. This
change lets us see more clearly where implicit conversions occur by
making them explicit.
|
|
It now enforces a bit more formatting. In particular, padding inside
parentheses is removed. I would like it to remove padding after unary
operators, but there seems to be no option for that.
|
|
1. Current module (if C file).
2. Headers from current library.
3. Headers from other library (e.g. toxcore includes in toxav).
4. System headers.
|
|
|
|
|
|
See #27 and #40 for details.
|
|
fix: make increment_nonce & increment_nonce_number independent of user-controlled input
fix: make crypto_core more stable agains null ptr dereference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rename array in Node_format from client_id to public_key.
|
|
They are now all uint16_t instead of sometimes being uint32_t.
Replaced some other uint32_t with unsigned ints.
|
|
for the auto tests.
|
|
|
|
|
|
with only the first byte set to 1 instead of 0 and the public key set
to the one of the reciever as a valid response packet.
This breaks network compatibility with all previous cores.
|
|
|
|
that require sending ping type packets.
Made ping packets use it.
|
|
Started writing the code.
Astyled some files.
|
|
Moved Bunch of functions from net_crypto to crypto_core.
decrypt_data_fast and decrypt_data_symmetric were the same thing
therefore, removed decrypt_data_fast.
Replaced all the crypto_secretbox_* defines with the equivalent
crypto_box_* one.
New define: crypto_box_KEYBYTES that is equal to
crypto_box_BEFORENMBYTES.
|
|
|
|
|
|
Use get_shared_key() in more places.
|
|
Shared keys for recieved DHT packets are now stored in a special array
so that they don't need to be recomputed for nodes that send us lots of
packets.
|
|
Same idea as last commit.
|
|
Only compute the shared key once instead of twice for received DHT
requests/responses.
|
|
|
|
Fixed a couple of issues related to that.
|
|
|
|
|