// Copyright (c) 2020 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include
#include
#include
#include
#include
#include
#include
#include
FUZZ_TARGET(random)
{
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
FastRandomContext fast_random_context{ConsumeUInt256(fuzzed_data_provider)};
(void)fast_random_context.rand64();
(void)fast_random_context.randbits(fuzzed_data_provider.ConsumeIntegralInRange(0, 64));
(void)fast_random_context.randrange(fuzzed_data_provider.ConsumeIntegralInRange(FastRandomContext::min() + 1, FastRandomContext::max()));
(void)fast_random_context.randbytes(fuzzed_data_provider.ConsumeIntegralInRange(0, 1024));
(void)fast_random_context.rand32();
(void)fast_random_context.rand256();
(void)fast_random_context.randbool();
(void)fast_random_context();
std::vector integrals = ConsumeRandomLengthIntegralVector(fuzzed_data_provider);
Shuffle(integrals.begin(), integrals.end(), fast_random_context);
std::shuffle(integrals.begin(), integrals.end(), fast_random_context);
}