From 37d4a0b2ca1377268a82c085809edf63d19cc782 Mon Sep 17 00:00:00 2001 From: iphydf Date: Wed, 28 Mar 2018 13:36:14 +0000 Subject: Avoid the use of rand() in tests. We control the random functions in crypto_core, so we can make them deterministic more easily. This will help test reproducibility in the future. --- toxcore/crypto_core.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'toxcore/crypto_core.h') diff --git a/toxcore/crypto_core.h b/toxcore/crypto_core.h index 2c83fd25..e7e913b6 100644 --- a/toxcore/crypto_core.h +++ b/toxcore/crypto_core.h @@ -126,6 +126,11 @@ void crypto_sha512(uint8_t *hash, const uint8_t *data, size_t length); */ int32_t public_key_cmp(const uint8_t *pk1, const uint8_t *pk2); +/** + * Return a random 8 bit integer. + */ +uint8_t random_u08(void); + /** * Return a random 16 bit integer. */ -- cgit v1.2.3