diff options
author | Oliver Hunt <oliver.huntuk@gmail.com> | 2013-07-14 02:57:16 +0100 |
---|---|---|
committer | Oliver Hunt <oliver.huntuk@gmail.com> | 2013-07-14 02:57:16 +0100 |
commit | b69fbb15e277effe0dc620c9d26d1741848b5ce6 (patch) | |
tree | 01b32bd2f2b38f8d65ba70f45fe159e5cb1adaf8 /core | |
parent | 9f38ab582c7d37548faf421136c58e128dd824d1 (diff) | |
parent | 65bda2a6c9c4bf3a207271c01aaf4b030db0415a (diff) |
Merge branch 'master' of https://github.com/irungentoo/ProjectTox-Core into ncursesclient
Diffstat (limited to 'core')
-rw-r--r-- | core/network.c | 4 | ||||
-rw-r--r-- | core/network.h | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/core/network.c b/core/network.c index 9693df1c..c08b3512 100644 --- a/core/network.c +++ b/core/network.c | |||
@@ -48,9 +48,11 @@ uint64_t current_time() | |||
48 | 48 | ||
49 | } | 49 | } |
50 | 50 | ||
51 | //return a random number | ||
52 | //NOTE: this function should probably not be used where cryptographic randomness is absolutely necessary | ||
51 | uint32_t random_int() | 53 | uint32_t random_int() |
52 | { | 54 | { |
53 | #ifdef WIN32 | 55 | #ifndef VANILLA_NACL |
54 | //NOTE: this function comes from libsodium | 56 | //NOTE: this function comes from libsodium |
55 | return randombytes_random(); | 57 | return randombytes_random(); |
56 | #else | 58 | #else |
diff --git a/core/network.h b/core/network.h index 4fa30905..33f11239 100644 --- a/core/network.h +++ b/core/network.h | |||
@@ -97,6 +97,7 @@ typedef struct | |||
97 | uint64_t current_time(); | 97 | uint64_t current_time(); |
98 | 98 | ||
99 | //return a random number | 99 | //return a random number |
100 | //NOTE: this function should probably not be used where cryptographic randomness is absolutely necessary | ||
100 | uint32_t random_int(); | 101 | uint32_t random_int(); |
101 | 102 | ||
102 | //Basic network functions: | 103 | //Basic network functions: |