From 3ecabae36364e905e7821fba3e60aa7f8418de6c Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Wed, 7 Jun 2017 11:34:55 -0700 Subject: Replace more rand() % NUM by randranges --- src/test/crypto_tests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/test/crypto_tests.cpp') diff --git a/src/test/crypto_tests.cpp b/src/test/crypto_tests.cpp index 4b76cc1021..ab3e6fc1fd 100644 --- a/src/test/crypto_tests.cpp +++ b/src/test/crypto_tests.cpp @@ -38,7 +38,7 @@ void TestVector(const Hasher &h, const In &in, const Out &out) { Hasher hasher(h); size_t pos = 0; while (pos < in.size()) { - size_t len = insecure_rand() % ((in.size() - pos + 1) / 2 + 1); + size_t len = insecure_randrange((in.size() - pos + 1) / 2 + 1); hasher.Write((unsigned char*)&in[pos], len); pos += len; if (pos > 0 && pos + 2 * out.size() > in.size() && pos < in.size()) { -- cgit v1.2.3