diff options
| author | Pieter Wuille <[email protected]> | 2017-06-07 12:03:17 -0700 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2017-06-07 12:08:39 -0700 |
| commit | e945848582160b23fa0bc6f797e2bd8ac676ee0e (patch) | |
| tree | 8f21846a56c3ee99978f9a64514ae8be2fa378ae /src/test/crypto_tests.cpp | |
| parent | scripted-diff: Use randbits/bool instead of randrange where possible (diff) | |
| download | discoin-e945848582160b23fa0bc6f797e2bd8ac676ee0e.tar.xz discoin-e945848582160b23fa0bc6f797e2bd8ac676ee0e.zip | |
scripted-diff: Use new naming style for insecure_rand* functions
-BEGIN VERIFY SCRIPT-
sed -i 's/\<insecure_randbits(/InsecureRandBits(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp
sed -i 's/\<insecure_randbool(/InsecureRandBool(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp
sed -i 's/\<insecure_randrange(/InsecureRandRange(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp
sed -i 's/\<insecure_randbytes(/InsecureRandBytes(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp
sed -i 's/\<insecure_rand256(/InsecureRand256(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp
sed -i 's/\<insecure_rand(/InsecureRand32(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp
sed -i 's/\<seed_insecure_rand(/SeedInsecureRand(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp
-END VERIFY SCRIPT-
Diffstat (limited to 'src/test/crypto_tests.cpp')
| -rw-r--r-- | src/test/crypto_tests.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/crypto_tests.cpp b/src/test/crypto_tests.cpp index ab3e6fc1f..a4f0e17c9 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_randrange((in.size() - pos + 1) / 2 + 1); + size_t len = InsecureRandRange((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()) { |