aboutsummaryrefslogtreecommitdiff
path: root/src/test/crypto_tests.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2017-06-07 11:34:55 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2017-06-07 11:34:55 -0700
commit3ecabae36364e905e7821fba3e60aa7f8418de6c (patch)
tree04b22d1cf440fcedacdea019f6421c629d766b44 /src/test/crypto_tests.cpp
parentefee1db21a652019e0ab18fffc233d91bb7f1816 (diff)
Replace more rand() % NUM by randranges
Diffstat (limited to 'src/test/crypto_tests.cpp')
-rw-r--r--src/test/crypto_tests.cpp2
1 files changed, 1 insertions, 1 deletions
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()) {