summaryrefslogtreecommitdiff
path: root/toxcore/network.h
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-09-13 10:42:14 -0400
committerirungentoo <irungentoo@gmail.com>2013-09-13 10:42:14 -0400
commit339dcd60707ea7b46f5c450569d32f852a1c0be7 (patch)
tree37ab2079cd253a5aa9c7dbf79442325d81efc5a1 /toxcore/network.h
parentf8b979a92a8c316c49bed28e158a468a2f74346c (diff)
Nonce generation changes.
Nonces don't need to be random, only different. also random_int now gives same quality random numbers for both NaCl and libsodium.
Diffstat (limited to 'toxcore/network.h')
-rw-r--r--toxcore/network.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/toxcore/network.h b/toxcore/network.h
index 98307e5b..e1f9b212 100644
--- a/toxcore/network.h
+++ b/toxcore/network.h
@@ -57,6 +57,7 @@
57#include <sodium.h> 57#include <sodium.h>
58#else 58#else
59#include <crypto_box.h> 59#include <crypto_box.h>
60#include <randombytes.h>
60#define crypto_box_MACBYTES (crypto_box_ZEROBYTES - crypto_box_BOXZEROBYTES) 61#define crypto_box_MACBYTES (crypto_box_ZEROBYTES - crypto_box_BOXZEROBYTES)
61#endif 62#endif
62 63
@@ -130,7 +131,6 @@ typedef struct {
130uint64_t current_time(void); 131uint64_t current_time(void);
131 132
132/* return a random number. 133/* return a random number.
133 * NOTE: this function should probably not be used where cryptographic randomness is absolutely necessary.
134 */ 134 */
135uint32_t random_int(void); 135uint32_t random_int(void);
136 136